John6666 commited on
Commit
d1ed6c1
1 Parent(s): a9f589c

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +22 -19
app.py CHANGED
@@ -229,27 +229,30 @@ def make_me():
229
  with gr.Row():
230
  #txt_input = gr.Textbox(lines=3, width=300, max_height=100)
231
  #txt_input = gr.Textbox(label='Your prompt:', lines=3, width=300, max_height=100)
232
- txt_input = gr.Textbox(label='Your prompt:', lines=3, scale=4)
233
- #gen_button = gr.Button('Generate images', width=150, height=30)
 
 
 
 
 
 
 
 
 
 
 
234
  #stop_button = gr.Button('Stop', variant='secondary', interactive=False, width=150, height=30)
235
- gen_button = gr.Button('Generate images', scale=2)
236
  stop_button = gr.Button('Stop', variant='secondary', interactive=False, scale=1)
237
- with gr.Accordion("Advanced", open=False, visible=True):
238
- neg_input = gr.Textbox(label='Negative prompt:', lines=1, scale=2)
239
- with gr.Row():
240
- width = gr.Number(label="Width", info="If 0, the default value is used.", maximum=1216, step=32, value=0)
241
- height = gr.Number(label="Height", info="If 0, the default value is used.", maximum=1216, step=32, value=0)
242
- with gr.Row():
243
- steps = gr.Number(label="Number of inference steps", info="If 0, the default value is used.", maximum=100, step=1, value=0)
244
- cfg = gr.Number(label="Guidance scale", info="If 0, the default value is used.", maximum=30.0, step=0.1, value=0)
245
- seed = gr.Slider(label="Seed", info="Randomize Seed if -1.", minimum=-1, maximum=MAX_SEED, step=1, value=-1)
246
  gen_button.click(lambda: gr.update(interactive=True), None, stop_button)
247
- gr.HTML("""
248
- <div style="text-align: center; max-width: 100%; margin: 0 auto;">
249
- <body>
250
- </body>
251
- </div>
252
- """)
253
  with gr.Row():
254
  """output = [gr.Image(label=m, min_width=170, height=170) for m in default_models]
255
  current_models = [gr.Textbox(m, visible=False) for m in default_models]"""
@@ -300,7 +303,7 @@ js_code = """
300
  """
301
 
302
 
303
- with gr.Blocks(theme='Nymbo/Nymbo_Theme', fill_width=True, css="div.float.svelte-1mwvhlq { position: absolute; top: var(--block-label-margin); left: var(--block-label-margin); background: none; border: none;}") as demo:
304
  gr.Markdown("<script>" + js_code + "</script>")
305
  make_me()
306
 
 
229
  with gr.Row():
230
  #txt_input = gr.Textbox(lines=3, width=300, max_height=100)
231
  #txt_input = gr.Textbox(label='Your prompt:', lines=3, width=300, max_height=100)
232
+ with gr.Column(scale=4):
233
+ with gr.Group():
234
+ txt_input = gr.Textbox(label='Your prompt:', lines=3)
235
+ with gr.Accordion("Advanced", open=False, visible=True):
236
+ neg_input = gr.Textbox(label='Negative prompt:', lines=1)
237
+ with gr.Row():
238
+ width = gr.Number(label="Width", info="If 0, the default value is used.", maximum=1216, step=32, value=0)
239
+ height = gr.Number(label="Height", info="If 0, the default value is used.", maximum=1216, step=32, value=0)
240
+ with gr.Row():
241
+ steps = gr.Number(label="Number of inference steps", info="If 0, the default value is used.", maximum=100, step=1, value=0)
242
+ cfg = gr.Number(label="Guidance scale", info="If 0, the default value is used.", maximum=30.0, step=0.1, value=0)
243
+ seed = gr.Slider(label="Seed", info="Randomize Seed if -1.", minimum=-1, maximum=MAX_SEED, step=1, value=-1)
244
+ #gen_button = gr.Button('Generate images', width=150, height=30)
245
  #stop_button = gr.Button('Stop', variant='secondary', interactive=False, width=150, height=30)
246
+ gen_button = gr.Button('Generate images', scale=3)
247
  stop_button = gr.Button('Stop', variant='secondary', interactive=False, scale=1)
248
+
 
 
 
 
 
 
 
 
249
  gen_button.click(lambda: gr.update(interactive=True), None, stop_button)
250
+ #gr.HTML("""
251
+ #<div style="text-align: center; max-width: 100%; margin: 0 auto;">
252
+ # <body>
253
+ # </body>
254
+ #</div>
255
+ #""")
256
  with gr.Row():
257
  """output = [gr.Image(label=m, min_width=170, height=170) for m in default_models]
258
  current_models = [gr.Textbox(m, visible=False) for m in default_models]"""
 
303
  """
304
 
305
 
306
+ with gr.Blocks(theme="Nymbo/Nymbo_Theme", fill_width=True, css="div.float.svelte-1mwvhlq { position: absolute; top: var(--block-label-margin); left: var(--block-label-margin); background: none; border: none;}") as demo:
307
  gr.Markdown("<script>" + js_code + "</script>")
308
  make_me()
309