Spaces:
Runtime error
Runtime error
Brian Watson
commited on
Commit
·
1723703
1
Parent(s):
0fdcfc0
Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ models = [
|
|
27 |
|
28 |
current_model = models[0]
|
29 |
|
30 |
-
text_gen = gr.Interface.load("spaces/
|
31 |
|
32 |
models2 = []
|
33 |
for model in models:
|
@@ -58,7 +58,7 @@ with gr.Blocks() as myface:
|
|
58 |
|
59 |
with gr.Row():
|
60 |
with gr.Row():
|
61 |
-
input_text = gr.Textbox(label="Prompt idea", lines=1)
|
62 |
# Model selection dropdown
|
63 |
model_name1 = gr.Dropdown(
|
64 |
label="Choose Model",
|
@@ -74,29 +74,29 @@ with gr.Blocks() as myface:
|
|
74 |
with gr.Row():
|
75 |
output1 = gr.Image(label="")
|
76 |
output2 = gr.Image(label="")
|
77 |
-
with gr.Row():
|
78 |
-
magic1 = gr.Textbox(lines=2)
|
79 |
-
magic2 = gr.Textbox(lines=2)
|
80 |
-
with gr.Row():
|
81 |
output3 = gr.Image(label="")
|
82 |
-
output4 = gr.Image(label="")
|
83 |
with gr.Row():
|
84 |
-
|
85 |
-
|
|
|
86 |
with gr.Row():
|
|
|
87 |
output5 = gr.Image(label="")
|
88 |
output6 = gr.Image(label="")
|
89 |
with gr.Row():
|
90 |
-
|
91 |
-
|
92 |
-
|
|
|
93 |
output7 = gr.Image(label="")
|
94 |
output8 = gr.Image(label="")
|
|
|
95 |
with gr.Row():
|
96 |
-
magic7 = gr.Textbox(lines=2)
|
97 |
-
magic8 = gr.Textbox(lines=2)
|
|
|
98 |
|
99 |
-
model_name1.change(set_model, inputs=model_name1, outputs=[output1, output2, output3, output4, output5, output6, output7, output8])
|
100 |
|
101 |
run.click(send_it, inputs=[magic1, model_name1], outputs=[output1])
|
102 |
run.click(send_it, inputs=[magic2, model_name1], outputs=[output2])
|
@@ -106,6 +106,7 @@ with gr.Blocks() as myface:
|
|
106 |
run.click(send_it, inputs=[magic6, model_name1], outputs=[output6])
|
107 |
run.click(send_it, inputs=[magic7, model_name1], outputs=[output7])
|
108 |
run.click(send_it, inputs=[magic8, model_name1], outputs=[output8])
|
|
|
109 |
|
110 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic1])
|
111 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic2])
|
@@ -115,6 +116,7 @@ with gr.Blocks() as myface:
|
|
115 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic6])
|
116 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic7])
|
117 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic8])
|
|
|
118 |
|
119 |
myface.queue(concurrency_count=200)
|
120 |
myface.launch(inline=True, show_api=False, max_threads=400)
|
|
|
27 |
|
28 |
current_model = models[0]
|
29 |
|
30 |
+
text_gen = gr.Interface.load("spaces/daspartho/prompt-extend")
|
31 |
|
32 |
models2 = []
|
33 |
for model in models:
|
|
|
58 |
|
59 |
with gr.Row():
|
60 |
with gr.Row():
|
61 |
+
input_text = gr.Textbox(label="Prompt idea", placeholder="Eg. Eyewear model", lines=1)
|
62 |
# Model selection dropdown
|
63 |
model_name1 = gr.Dropdown(
|
64 |
label="Choose Model",
|
|
|
74 |
with gr.Row():
|
75 |
output1 = gr.Image(label="")
|
76 |
output2 = gr.Image(label="")
|
|
|
|
|
|
|
|
|
77 |
output3 = gr.Image(label="")
|
|
|
78 |
with gr.Row():
|
79 |
+
magic1 = gr.Textbox(label="Generated Prompt", lines=2)
|
80 |
+
magic2 = gr.Textbox(label="Generated Prompt", lines=2)
|
81 |
+
magic3 = gr.Textbox(label="Generated Prompt", lines=2)
|
82 |
with gr.Row():
|
83 |
+
output4 = gr.Image(label="")
|
84 |
output5 = gr.Image(label="")
|
85 |
output6 = gr.Image(label="")
|
86 |
with gr.Row():
|
87 |
+
magic4 = gr.Textbox(label="Generated Prompt", lines=2)
|
88 |
+
magic5 = gr.Textbox(label="Generated Prompt", lines=2)
|
89 |
+
magic6 = gr.Textbox(label="Generated Prompt", lines=2)
|
90 |
+
with gr.Row():
|
91 |
output7 = gr.Image(label="")
|
92 |
output8 = gr.Image(label="")
|
93 |
+
output9 = gr.Image(label="")
|
94 |
with gr.Row():
|
95 |
+
magic7 = gr.Textbox(label="Generated Prompt", lines=2)
|
96 |
+
magic8 = gr.Textbox(label="Generated Prompt", lines=2)
|
97 |
+
magic9 = gr.Textbox(label="Generated Prompt", lines=2)
|
98 |
|
99 |
+
model_name1.change(set_model, inputs=model_name1, outputs=[output1, output2, output3, output4, output5, output6, output7, output8, output9])
|
100 |
|
101 |
run.click(send_it, inputs=[magic1, model_name1], outputs=[output1])
|
102 |
run.click(send_it, inputs=[magic2, model_name1], outputs=[output2])
|
|
|
106 |
run.click(send_it, inputs=[magic6, model_name1], outputs=[output6])
|
107 |
run.click(send_it, inputs=[magic7, model_name1], outputs=[output7])
|
108 |
run.click(send_it, inputs=[magic8, model_name1], outputs=[output8])
|
109 |
+
run.click(send_it, inputs=[magic9, model_name1], outputs=[output9])
|
110 |
|
111 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic1])
|
112 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic2])
|
|
|
116 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic6])
|
117 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic7])
|
118 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic8])
|
119 |
+
see_prompts.click(text_it, inputs=[input_text], outputs=[magic9])
|
120 |
|
121 |
myface.queue(concurrency_count=200)
|
122 |
myface.launch(inline=True, show_api=False, max_threads=400)
|