Brian Watson commited on
Commit
739a269
1 Parent(s): 4a236b8

Update app.py

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