noes14155 commited on
Commit
16053e1
·
1 Parent(s): debdaad

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +16 -21
app.py CHANGED
@@ -29,36 +29,31 @@ def dropdown_change():
29
  send_it(input_text, model_name1)
30
 
31
  with gr.Blocks() as myface:
32
- gr.HTML(
33
 
34
- )
35
-
36
- with gr.Row():
37
- with gr.Row():
38
- input_text = gr.Textbox(label="Prompt idea", placeholder="", lines=1)
39
- # Model selection dropdown
40
- model_name1 = gr.Dropdown(
41
  label="Choose Model",
42
  choices=[m["name"] for m in models],
43
  type="index",
44
  value=current_model["name"],
45
  interactive=True
46
- )
47
-
48
- run = gr.Button("Generate Images", variant="primary")
49
-
50
- with gr.Row():
51
- output1 = gr.Image(label="", style="height: 300px; width: 300px;")
52
 
 
 
 
 
 
 
 
 
 
 
53
  model_name1.change(send_it, inputs=[input_text, model_name1], outputs=[output1])
54
-
55
-
56
  run.click(send_it, inputs=[input_text, model_name1], outputs=[output1])
57
 
58
-
59
-
60
-
61
-
62
-
63
  myface.queue(concurrency_count=200)
64
  myface.launch(inline=True, show_api=True, max_threads=500)
 
29
  send_it(input_text, model_name1)
30
 
31
  with gr.Blocks() as myface:
32
+ gr.HTML()
33
 
34
+
35
+ input_text = gr.Textbox(label="Prompt idea", placeholder="", lines=1)
36
+ # Model selection dropdown
37
+ model_name1 = gr.Dropdown(
 
 
 
38
  label="Choose Model",
39
  choices=[m["name"] for m in models],
40
  type="index",
41
  value=current_model["name"],
42
  interactive=True
43
+ )
 
 
 
 
 
44
 
45
+ run = gr.Button("Generate Images", variant="primary")
46
+ output1 = gr.Image(label="")
47
+
48
+ gr.Column(
49
+ input_text,
50
+ model_name1,
51
+ gr.Row(run),
52
+ gr.Row(output1),
53
+ outputs=[output1]
54
+ )
55
  model_name1.change(send_it, inputs=[input_text, model_name1], outputs=[output1])
 
 
56
  run.click(send_it, inputs=[input_text, model_name1], outputs=[output1])
57
 
 
 
 
 
 
58
  myface.queue(concurrency_count=200)
59
  myface.launch(inline=True, show_api=True, max_threads=500)