Brian Watson commited on
Commit
6c2fcdd
1 Parent(s): 270c82d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +18 -16
app.py CHANGED
@@ -14,7 +14,7 @@ models = [
14
 
15
  current_model = models[0]
16
 
17
- text_gen = gr.Interface.load("spaces/Omnibus/MagicPrompt-Stable-Diffusion_link")
18
 
19
  models2 = []
20
  for model in models:
@@ -45,7 +45,7 @@ with gr.Blocks() as myface:
45
 
46
  with gr.Row():
47
  with gr.Row():
48
- input_text = gr.Textbox(label="Prompt idea", lines=1)
49
  # Model selection dropdown
50
  model_name1 = gr.Dropdown(
51
  label="Choose Model",
@@ -61,29 +61,29 @@ with gr.Blocks() as myface:
61
  with gr.Row():
62
  output1 = gr.Image(label="")
63
  output2 = gr.Image(label="")
64
- with gr.Row():
65
- magic1 = gr.Textbox(lines=2)
66
- magic2 = gr.Textbox(lines=2)
67
- with gr.Row():
68
  output3 = gr.Image(label="")
69
- output4 = gr.Image(label="")
70
  with gr.Row():
71
- magic3 = gr.Textbox(lines=2)
72
- magic4 = gr.Textbox(lines=2)
 
73
  with gr.Row():
 
74
  output5 = gr.Image(label="")
75
  output6 = gr.Image(label="")
76
  with gr.Row():
77
- magic5 = gr.Textbox(lines=2)
78
- magic6 = gr.Textbox(lines=2)
79
- with gr.Row():
 
80
  output7 = gr.Image(label="")
81
  output8 = gr.Image(label="")
 
82
  with gr.Row():
83
- magic7 = gr.Textbox(lines=2)
84
- magic8 = gr.Textbox(lines=2)
 
85
 
86
- model_name1.change(set_model, inputs=model_name1, outputs=[output1, output2, output3, output4, output5, output6, output7, output8])
87
 
88
  run.click(send_it, inputs=[magic1, model_name1], outputs=[output1])
89
  run.click(send_it, inputs=[magic2, model_name1], outputs=[output2])
@@ -93,6 +93,7 @@ with gr.Blocks() as myface:
93
  run.click(send_it, inputs=[magic6, model_name1], outputs=[output6])
94
  run.click(send_it, inputs=[magic7, model_name1], outputs=[output7])
95
  run.click(send_it, inputs=[magic8, model_name1], outputs=[output8])
 
96
 
97
  see_prompts.click(text_it, inputs=[input_text], outputs=[magic1])
98
  see_prompts.click(text_it, inputs=[input_text], outputs=[magic2])
@@ -102,6 +103,7 @@ with gr.Blocks() as myface:
102
  see_prompts.click(text_it, inputs=[input_text], outputs=[magic6])
103
  see_prompts.click(text_it, inputs=[input_text], outputs=[magic7])
104
  see_prompts.click(text_it, inputs=[input_text], outputs=[magic8])
 
105
 
106
  myface.queue(concurrency_count=200)
107
- myface.launch(inline=True, show_api=False, max_threads=400)
 
14
 
15
  current_model = models[0]
16
 
17
+ text_gen = gr.Interface.load("spaces/daspartho/prompt-extend")
18
 
19
  models2 = []
20
  for model in models:
 
45
 
46
  with gr.Row():
47
  with gr.Row():
48
+ input_text = gr.Textbox(label="Prompt idea", placeholder="", lines=1)
49
  # Model selection dropdown
50
  model_name1 = gr.Dropdown(
51
  label="Choose Model",
 
61
  with gr.Row():
62
  output1 = gr.Image(label="")
63
  output2 = gr.Image(label="")
 
 
 
 
64
  output3 = gr.Image(label="")
 
65
  with gr.Row():
66
+ magic1 = gr.Textbox(label="Generated Prompt", lines=2)
67
+ magic2 = gr.Textbox(label="Generated Prompt", lines=2)
68
+ magic3 = gr.Textbox(label="Generated Prompt", lines=2)
69
  with gr.Row():
70
+ output4 = gr.Image(label="")
71
  output5 = gr.Image(label="")
72
  output6 = gr.Image(label="")
73
  with gr.Row():
74
+ magic4 = gr.Textbox(label="Generated Prompt", lines=2)
75
+ magic5 = gr.Textbox(label="Generated Prompt", lines=2)
76
+ magic6 = gr.Textbox(label="Generated Prompt", lines=2)
77
+ with gr.Row():
78
  output7 = gr.Image(label="")
79
  output8 = gr.Image(label="")
80
+ output9 = gr.Image(label="")
81
  with gr.Row():
82
+ magic7 = gr.Textbox(label="Generated Prompt", lines=2)
83
+ magic8 = gr.Textbox(label="Generated Prompt", lines=2)
84
+ magic9 = gr.Textbox(label="Generated Prompt", lines=2)
85
 
86
+ model_name1.change(set_model, inputs=model_name1, outputs=[output1, output2, output3, output4, output5, output6, output7, output8, output9])
87
 
88
  run.click(send_it, inputs=[magic1, model_name1], outputs=[output1])
89
  run.click(send_it, inputs=[magic2, model_name1], outputs=[output2])
 
93
  run.click(send_it, inputs=[magic6, model_name1], outputs=[output6])
94
  run.click(send_it, inputs=[magic7, model_name1], outputs=[output7])
95
  run.click(send_it, inputs=[magic8, model_name1], outputs=[output8])
96
+ run.click(send_it, inputs=[magic9, model_name1], outputs=[output9])
97
 
98
  see_prompts.click(text_it, inputs=[input_text], outputs=[magic1])
99
  see_prompts.click(text_it, inputs=[input_text], outputs=[magic2])
 
103
  see_prompts.click(text_it, inputs=[input_text], outputs=[magic6])
104
  see_prompts.click(text_it, inputs=[input_text], outputs=[magic7])
105
  see_prompts.click(text_it, inputs=[input_text], outputs=[magic8])
106
+ see_prompts.click(text_it, inputs=[input_text], outputs=[magic9])
107
 
108
  myface.queue(concurrency_count=200)
109
+ myface.launch(inline=True, show_api=False, max_threads=400)