Spaces:
Runtime error
Runtime error
Brian Watson
commited on
Commit
•
9df61a7
1
Parent(s):
bf8f66c
Update app.py
Browse files
app.py
CHANGED
@@ -13,7 +13,7 @@ models = [
|
|
13 |
|
14 |
current_model = models[0]
|
15 |
|
16 |
-
text_gen = gr.Interface.load("spaces/
|
17 |
|
18 |
models2 = []
|
19 |
for model in models:
|
@@ -44,7 +44,7 @@ with gr.Blocks() as myface:
|
|
44 |
|
45 |
with gr.Row():
|
46 |
with gr.Row():
|
47 |
-
input_text = gr.Textbox(label="Prompt idea", lines=1)
|
48 |
# Model selection dropdown
|
49 |
model_name1 = gr.Dropdown(
|
50 |
label="Choose Model",
|
@@ -60,29 +60,29 @@ with gr.Blocks() as myface:
|
|
60 |
with gr.Row():
|
61 |
output1 = gr.Image(label="")
|
62 |
output2 = gr.Image(label="")
|
63 |
-
with gr.Row():
|
64 |
-
magic1 = gr.Textbox(lines=2)
|
65 |
-
magic2 = gr.Textbox(lines=2)
|
66 |
-
with gr.Row():
|
67 |
output3 = gr.Image(label="")
|
68 |
-
output4 = gr.Image(label="")
|
69 |
with gr.Row():
|
70 |
-
|
71 |
-
|
|
|
72 |
with gr.Row():
|
|
|
73 |
output5 = gr.Image(label="")
|
74 |
output6 = gr.Image(label="")
|
75 |
with gr.Row():
|
76 |
-
|
77 |
-
|
78 |
-
|
|
|
79 |
output7 = gr.Image(label="")
|
80 |
output8 = gr.Image(label="")
|
|
|
81 |
with gr.Row():
|
82 |
-
magic7 = gr.Textbox(lines=2)
|
83 |
-
magic8 = gr.Textbox(lines=2)
|
|
|
84 |
|
85 |
-
model_name1.change(set_model, inputs=model_name1, outputs=[output1, output2, output3, output4, output5, output6, output7, output8])
|
86 |
|
87 |
run.click(send_it, inputs=[magic1, model_name1], outputs=[output1])
|
88 |
run.click(send_it, inputs=[magic2, model_name1], outputs=[output2])
|
@@ -92,6 +92,7 @@ with gr.Blocks() as myface:
|
|
92 |
run.click(send_it, inputs=[magic6, model_name1], outputs=[output6])
|
93 |
run.click(send_it, inputs=[magic7, model_name1], outputs=[output7])
|
94 |
run.click(send_it, inputs=[magic8, model_name1], outputs=[output8])
|
|
|
95 |
|
96 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic1])
|
97 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic2])
|
@@ -101,6 +102,7 @@ with gr.Blocks() as myface:
|
|
101 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic6])
|
102 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic7])
|
103 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic8])
|
|
|
104 |
|
105 |
myface.queue(concurrency_count=200)
|
106 |
-
myface.launch(inline=True, show_api=False, max_threads=400)
|
|
|
13 |
|
14 |
current_model = models[0]
|
15 |
|
16 |
+
text_gen = gr.Interface.load("spaces/daspartho/prompt-extend")
|
17 |
|
18 |
models2 = []
|
19 |
for model in models:
|
|
|
44 |
|
45 |
with gr.Row():
|
46 |
with gr.Row():
|
47 |
+
input_text = gr.Textbox(label="Prompt idea", placeholder="Eg. Eyewear model", lines=1)
|
48 |
# Model selection dropdown
|
49 |
model_name1 = gr.Dropdown(
|
50 |
label="Choose Model",
|
|
|
60 |
with gr.Row():
|
61 |
output1 = gr.Image(label="")
|
62 |
output2 = gr.Image(label="")
|
|
|
|
|
|
|
|
|
63 |
output3 = gr.Image(label="")
|
|
|
64 |
with gr.Row():
|
65 |
+
magic1 = gr.Textbox(label="Generated Prompt", lines=2)
|
66 |
+
magic2 = gr.Textbox(label="Generated Prompt", lines=2)
|
67 |
+
magic3 = gr.Textbox(label="Generated Prompt", lines=2)
|
68 |
with gr.Row():
|
69 |
+
output4 = gr.Image(label="")
|
70 |
output5 = gr.Image(label="")
|
71 |
output6 = gr.Image(label="")
|
72 |
with gr.Row():
|
73 |
+
magic4 = gr.Textbox(label="Generated Prompt", lines=2)
|
74 |
+
magic5 = gr.Textbox(label="Generated Prompt", lines=2)
|
75 |
+
magic6 = gr.Textbox(label="Generated Prompt", lines=2)
|
76 |
+
with gr.Row():
|
77 |
output7 = gr.Image(label="")
|
78 |
output8 = gr.Image(label="")
|
79 |
+
output9 = gr.Image(label="")
|
80 |
with gr.Row():
|
81 |
+
magic7 = gr.Textbox(label="Generated Prompt", lines=2)
|
82 |
+
magic8 = gr.Textbox(label="Generated Prompt", lines=2)
|
83 |
+
magic9 = gr.Textbox(label="Generated Prompt", lines=2)
|
84 |
|
85 |
+
model_name1.change(set_model, inputs=model_name1, outputs=[output1, output2, output3, output4, output5, output6, output7, output8, output9])
|
86 |
|
87 |
run.click(send_it, inputs=[magic1, model_name1], outputs=[output1])
|
88 |
run.click(send_it, inputs=[magic2, model_name1], outputs=[output2])
|
|
|
92 |
run.click(send_it, inputs=[magic6, model_name1], outputs=[output6])
|
93 |
run.click(send_it, inputs=[magic7, model_name1], outputs=[output7])
|
94 |
run.click(send_it, inputs=[magic8, model_name1], outputs=[output8])
|
95 |
+
run.click(send_it, inputs=[magic9, model_name1], outputs=[output9])
|
96 |
|
97 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic1])
|
98 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic2])
|
|
|
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 |
+
see_prompts.click(text_it, inputs=[input_text], outputs=[magic9])
|
106 |
|
107 |
myface.queue(concurrency_count=200)
|
108 |
+
myface.launch(inline=True, show_api=False, max_threads=400)
|