DigiP-AI commited on
Commit
f67e11a
·
verified ·
1 Parent(s): 9461ac9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -3
app.py CHANGED
@@ -15,6 +15,11 @@ import re
15
  from gradio_client import Client
16
  from fake_useragent import UserAgent
17
  import random
 
 
 
 
 
18
 
19
 
20
  def flip_text(prompt, negative_prompt, task, steps, sampler, cfg_scale, seed):
@@ -194,7 +199,7 @@ height: 100% !important;
194
  }
195
  """
196
 
197
- with gr.Blocks(css=css) as demo:
198
 
199
  with gr.Tab("Базовые настройки"):
200
  with gr.Row():
@@ -238,5 +243,8 @@ with gr.Blocks(css=css) as demo:
238
  img2img_b = gr.Button("Увеличить изображение", variant='secondary')
239
  image_i2i = gr.Image(show_label=True, label='Увеличенное изображение:')
240
  img2img_b.click(mirror, inputs=[image_output, scale_by, method, gfpgan, codeformer], outputs=image_i2i, concurrency_limit=48)
241
-
242
- demo.launch()
 
 
 
 
15
  from gradio_client import Client
16
  from fake_useragent import UserAgent
17
  import random
18
+ from theme import theme
19
+ from fastapi import FastAPI
20
+
21
+ app = FastAPI()
22
+ @app.get("/")
23
 
24
 
25
  def flip_text(prompt, negative_prompt, task, steps, sampler, cfg_scale, seed):
 
199
  }
200
  """
201
 
202
+ with gr.Blocks(css=css) as app:
203
 
204
  with gr.Tab("Базовые настройки"):
205
  with gr.Row():
 
243
  img2img_b = gr.Button("Увеличить изображение", variant='secondary')
244
  image_i2i = gr.Image(show_label=True, label='Увеличенное изображение:')
245
  img2img_b.click(mirror, inputs=[image_output, scale_by, method, gfpgan, codeformer], outputs=image_i2i, concurrency_limit=48)
246
+
247
+
248
+ if __name__ == "__main__":
249
+ app.launch(show_api=False, share=False)
250
+