Spaces:
Runtime error
Runtime error
Brian Watson
commited on
Commit
·
8c1812c
1
Parent(s):
dbaf37f
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ models = [
|
|
19 |
|
20 |
current_model = models[0]
|
21 |
|
22 |
-
text_gen = gr.Interface.load("spaces/
|
23 |
|
24 |
models2 = []
|
25 |
for model in models:
|
@@ -50,7 +50,7 @@ with gr.Blocks() as myface:
|
|
50 |
|
51 |
with gr.Row():
|
52 |
with gr.Row():
|
53 |
-
input_text = gr.Textbox(label="Prompt idea", lines=1)
|
54 |
# Model selection dropdown
|
55 |
model_name1 = gr.Dropdown(
|
56 |
label="Choose Model",
|
@@ -66,29 +66,29 @@ with gr.Blocks() as myface:
|
|
66 |
with gr.Row():
|
67 |
output1 = gr.Image(label="")
|
68 |
output2 = gr.Image(label="")
|
69 |
-
with gr.Row():
|
70 |
-
magic1 = gr.Textbox(lines=2)
|
71 |
-
magic2 = gr.Textbox(lines=2)
|
72 |
-
with gr.Row():
|
73 |
output3 = gr.Image(label="")
|
74 |
-
output4 = gr.Image(label="")
|
75 |
with gr.Row():
|
76 |
-
|
77 |
-
|
|
|
78 |
with gr.Row():
|
|
|
79 |
output5 = gr.Image(label="")
|
80 |
output6 = gr.Image(label="")
|
81 |
with gr.Row():
|
82 |
-
|
83 |
-
|
84 |
-
|
|
|
85 |
output7 = gr.Image(label="")
|
86 |
output8 = gr.Image(label="")
|
|
|
87 |
with gr.Row():
|
88 |
-
magic7 = gr.Textbox(lines=2)
|
89 |
-
magic8 = gr.Textbox(lines=2)
|
|
|
90 |
|
91 |
-
model_name1.change(set_model, inputs=model_name1, outputs=[output1, output2, output3, output4, output5, output6, output7, output8])
|
92 |
|
93 |
run.click(send_it, inputs=[magic1, model_name1], outputs=[output1])
|
94 |
run.click(send_it, inputs=[magic2, model_name1], outputs=[output2])
|
@@ -98,6 +98,7 @@ with gr.Blocks() as myface:
|
|
98 |
run.click(send_it, inputs=[magic6, model_name1], outputs=[output6])
|
99 |
run.click(send_it, inputs=[magic7, model_name1], outputs=[output7])
|
100 |
run.click(send_it, inputs=[magic8, model_name1], outputs=[output8])
|
|
|
101 |
|
102 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic1])
|
103 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic2])
|
@@ -107,6 +108,7 @@ with gr.Blocks() as myface:
|
|
107 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic6])
|
108 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic7])
|
109 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic8])
|
|
|
110 |
|
111 |
myface.queue(concurrency_count=200)
|
112 |
myface.launch(inline=True, show_api=False, max_threads=400)
|
|
|
19 |
|
20 |
current_model = models[0]
|
21 |
|
22 |
+
text_gen = gr.Interface.load("spaces/daspartho/prompt-extend")
|
23 |
|
24 |
models2 = []
|
25 |
for model in models:
|
|
|
50 |
|
51 |
with gr.Row():
|
52 |
with gr.Row():
|
53 |
+
input_text = gr.Textbox(label="Prompt idea", placeholder="Eg. Eyewear model", lines=1)
|
54 |
# Model selection dropdown
|
55 |
model_name1 = gr.Dropdown(
|
56 |
label="Choose Model",
|
|
|
66 |
with gr.Row():
|
67 |
output1 = gr.Image(label="")
|
68 |
output2 = gr.Image(label="")
|
|
|
|
|
|
|
|
|
69 |
output3 = gr.Image(label="")
|
|
|
70 |
with gr.Row():
|
71 |
+
magic1 = gr.Textbox(label="Generated Prompt", lines=2)
|
72 |
+
magic2 = gr.Textbox(label="Generated Prompt", lines=2)
|
73 |
+
magic3 = gr.Textbox(label="Generated Prompt", lines=2)
|
74 |
with gr.Row():
|
75 |
+
output4 = gr.Image(label="")
|
76 |
output5 = gr.Image(label="")
|
77 |
output6 = gr.Image(label="")
|
78 |
with gr.Row():
|
79 |
+
magic4 = gr.Textbox(label="Generated Prompt", lines=2)
|
80 |
+
magic5 = gr.Textbox(label="Generated Prompt", lines=2)
|
81 |
+
magic6 = gr.Textbox(label="Generated Prompt", lines=2)
|
82 |
+
with gr.Row():
|
83 |
output7 = gr.Image(label="")
|
84 |
output8 = gr.Image(label="")
|
85 |
+
output9 = gr.Image(label="")
|
86 |
with gr.Row():
|
87 |
+
magic7 = gr.Textbox(label="Generated Prompt", lines=2)
|
88 |
+
magic8 = gr.Textbox(label="Generated Prompt", lines=2)
|
89 |
+
magic9 = gr.Textbox(label="Generated Prompt", lines=2)
|
90 |
|
91 |
+
model_name1.change(set_model, inputs=model_name1, outputs=[output1, output2, output3, output4, output5, output6, output7, output8, output9])
|
92 |
|
93 |
run.click(send_it, inputs=[magic1, model_name1], outputs=[output1])
|
94 |
run.click(send_it, inputs=[magic2, model_name1], outputs=[output2])
|
|
|
98 |
run.click(send_it, inputs=[magic6, model_name1], outputs=[output6])
|
99 |
run.click(send_it, inputs=[magic7, model_name1], outputs=[output7])
|
100 |
run.click(send_it, inputs=[magic8, model_name1], outputs=[output8])
|
101 |
+
run.click(send_it, inputs=[magic9, model_name1], outputs=[output9])
|
102 |
|
103 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic1])
|
104 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic2])
|
|
|
108 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic6])
|
109 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic7])
|
110 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic8])
|
111 |
+
see_prompts.click(text_it, inputs=[input_text], outputs=[magic9])
|
112 |
|
113 |
myface.queue(concurrency_count=200)
|
114 |
myface.launch(inline=True, show_api=False, max_threads=400)
|