DigiP-AI commited on
Commit
e58dba8
·
verified ·
1 Parent(s): 0bf7da3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -19,7 +19,7 @@ from theme import theme
19
  from fastapi import FastAPI
20
 
21
  app = FastAPI()
22
-
23
 
24
  def query(prompt, negative_prompt, task, steps=35, sampler="DPM++ 2M Karras", cfg_scale=7, seed=-1, width=896, height=1152):
25
  result = {"prompt": prompt,"negative_prompt": negative_prompt,"task": task,"steps": steps,"sampler": sampler,"cfg_scale": cfg_scale,"seed": seed, "width": width, "height": height}
@@ -195,7 +195,7 @@ footer {
195
 
196
  with gr.Blocks(css=css, theme=theme, fill_width= False) as app:
197
  with gr.Tab("Basic Settings"):
198
- with gr.Column(scale=0):
199
  with gr.Row():
200
  prompt = gr.Textbox(placeholder="Enter the image description...", show_label=True, label='Image Prompt ✍️', lines=3, scale=6, show_copy_button = True)
201
  with gr.Row():
@@ -208,7 +208,7 @@ with gr.Blocks(css=css, theme=theme, fill_width= False) as app:
208
  )
209
 
210
  with gr.Tab("Extended settings"):
211
- with gr.Column(scale=0):
212
  with gr.Row():
213
  negative_prompt = gr.Textbox(placeholder="Negative Prompt", show_label=True, label='Negative Prompt:', scale=6, lines=3, value="[deformed | disfigured], poorly drawn, [bad : wrong] anatomy, [extra | missing | floating | disconnected] limb, (mutated hands and fingers), blurry")
214
 
@@ -226,7 +226,7 @@ with gr.Blocks(css=css, theme=theme, fill_width= False) as app:
226
  with gr.Row():
227
  height = gr.Slider(label="Height", minimum=512, maximum=2048, step=8, value=1152,interactive=True,)
228
 
229
- with gr.Column(scale=0):
230
  text_button = gr.Button("Generate image", variant="primary", interactive=True, elem_id="generate")
231
  with gr.Column(scale=0):
232
  image_output = gr.Image(show_download_button=True, interactive=False, label='Generated Image 🌄', show_share_button=False, show_fullscreen_button=True, format="png", elem_id="gallery")
 
19
  from fastapi import FastAPI
20
 
21
  app = FastAPI()
22
+ @app.get("/")
23
 
24
  def query(prompt, negative_prompt, task, steps=35, sampler="DPM++ 2M Karras", cfg_scale=7, seed=-1, width=896, height=1152):
25
  result = {"prompt": prompt,"negative_prompt": negative_prompt,"task": task,"steps": steps,"sampler": sampler,"cfg_scale": cfg_scale,"seed": seed, "width": width, "height": height}
 
195
 
196
  with gr.Blocks(css=css, theme=theme, fill_width= False) as app:
197
  with gr.Tab("Basic Settings"):
198
+ with gr.Column(scale=1):
199
  with gr.Row():
200
  prompt = gr.Textbox(placeholder="Enter the image description...", show_label=True, label='Image Prompt ✍️', lines=3, scale=6, show_copy_button = True)
201
  with gr.Row():
 
208
  )
209
 
210
  with gr.Tab("Extended settings"):
211
+ with gr.Column(scale=3):
212
  with gr.Row():
213
  negative_prompt = gr.Textbox(placeholder="Negative Prompt", show_label=True, label='Negative Prompt:', scale=6, lines=3, value="[deformed | disfigured], poorly drawn, [bad : wrong] anatomy, [extra | missing | floating | disconnected] limb, (mutated hands and fingers), blurry")
214
 
 
226
  with gr.Row():
227
  height = gr.Slider(label="Height", minimum=512, maximum=2048, step=8, value=1152,interactive=True,)
228
 
229
+ with gr.Column(scale=3):
230
  text_button = gr.Button("Generate image", variant="primary", interactive=True, elem_id="generate")
231
  with gr.Column(scale=0):
232
  image_output = gr.Image(show_download_button=True, interactive=False, label='Generated Image 🌄', show_share_button=False, show_fullscreen_button=True, format="png", elem_id="gallery")