Brian Watson commited on
Commit
b6f7524
1 Parent(s): a9d8c5f

Update app.py

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