Spaces:
Runtime error
Runtime error
Brian Watson
commited on
Commit
·
e719027
1
Parent(s):
2b53c4f
Update app.py
Browse files
app.py
CHANGED
@@ -4,6 +4,7 @@ import sys
|
|
4 |
from pathlib import Path
|
5 |
|
6 |
models = [
|
|
|
7 |
{"name": "Claudfuen 1", "url": "claudfuen/photorealistic-fuen-v1"},
|
8 |
{"name": "Deliberate", "url": "Masagin/Deliberate"},
|
9 |
{"name": "Dreamlike Photoreal", "url": "dreamlike-art/dreamlike-photoreal-2.0"},
|
@@ -14,7 +15,7 @@ models = [
|
|
14 |
|
15 |
current_model = models[0]
|
16 |
|
17 |
-
text_gen = gr.Interface.load("spaces/
|
18 |
|
19 |
models2 = []
|
20 |
for model in models:
|
@@ -45,7 +46,7 @@ with gr.Blocks() as myface:
|
|
45 |
|
46 |
with gr.Row():
|
47 |
with gr.Row():
|
48 |
-
input_text = gr.Textbox(label="Prompt idea", lines=1)
|
49 |
# Model selection dropdown
|
50 |
model_name1 = gr.Dropdown(
|
51 |
label="Choose Model",
|
@@ -61,29 +62,29 @@ with gr.Blocks() as myface:
|
|
61 |
with gr.Row():
|
62 |
output1 = gr.Image(label="")
|
63 |
output2 = gr.Image(label="")
|
64 |
-
with gr.Row():
|
65 |
-
magic1 = gr.Textbox(lines=2)
|
66 |
-
magic2 = gr.Textbox(lines=2)
|
67 |
-
with gr.Row():
|
68 |
output3 = gr.Image(label="")
|
69 |
-
output4 = gr.Image(label="")
|
70 |
with gr.Row():
|
71 |
-
|
72 |
-
|
|
|
73 |
with gr.Row():
|
|
|
74 |
output5 = gr.Image(label="")
|
75 |
output6 = gr.Image(label="")
|
76 |
with gr.Row():
|
77 |
-
|
78 |
-
|
79 |
-
|
|
|
80 |
output7 = gr.Image(label="")
|
81 |
output8 = gr.Image(label="")
|
|
|
82 |
with gr.Row():
|
83 |
-
magic7 = gr.Textbox(lines=2)
|
84 |
-
magic8 = gr.Textbox(lines=2)
|
|
|
85 |
|
86 |
-
model_name1.change(set_model, inputs=model_name1, outputs=[output1, output2, output3, output4, output5, output6, output7, output8])
|
87 |
|
88 |
run.click(send_it, inputs=[magic1, model_name1], outputs=[output1])
|
89 |
run.click(send_it, inputs=[magic2, model_name1], outputs=[output2])
|
@@ -93,6 +94,7 @@ with gr.Blocks() as myface:
|
|
93 |
run.click(send_it, inputs=[magic6, model_name1], outputs=[output6])
|
94 |
run.click(send_it, inputs=[magic7, model_name1], outputs=[output7])
|
95 |
run.click(send_it, inputs=[magic8, model_name1], outputs=[output8])
|
|
|
96 |
|
97 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic1])
|
98 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic2])
|
@@ -102,6 +104,7 @@ with gr.Blocks() as myface:
|
|
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 |
|
106 |
myface.queue(concurrency_count=200)
|
107 |
myface.launch(inline=True, show_api=False, max_threads=400)
|
|
|
4 |
from pathlib import Path
|
5 |
|
6 |
models = [
|
7 |
+
{"name": "Best Model", "url": "dreamlike-art/dreamlike-photoreal-2.0"},
|
8 |
{"name": "Claudfuen 1", "url": "claudfuen/photorealistic-fuen-v1"},
|
9 |
{"name": "Deliberate", "url": "Masagin/Deliberate"},
|
10 |
{"name": "Dreamlike Photoreal", "url": "dreamlike-art/dreamlike-photoreal-2.0"},
|
|
|
15 |
|
16 |
current_model = models[0]
|
17 |
|
18 |
+
text_gen = gr.Interface.load("spaces/daspartho/prompt-extend")
|
19 |
|
20 |
models2 = []
|
21 |
for model in models:
|
|
|
46 |
|
47 |
with gr.Row():
|
48 |
with gr.Row():
|
49 |
+
input_text = gr.Textbox(label="Prompt idea", placeholder="Eg. Eyewear model", lines=1)
|
50 |
# Model selection dropdown
|
51 |
model_name1 = gr.Dropdown(
|
52 |
label="Choose Model",
|
|
|
62 |
with gr.Row():
|
63 |
output1 = gr.Image(label="")
|
64 |
output2 = gr.Image(label="")
|
|
|
|
|
|
|
|
|
65 |
output3 = gr.Image(label="")
|
|
|
66 |
with gr.Row():
|
67 |
+
magic1 = gr.Textbox(label="Generated Prompt", lines=2)
|
68 |
+
magic2 = gr.Textbox(label="Generated Prompt", lines=2)
|
69 |
+
magic3 = gr.Textbox(label="Generated Prompt", lines=2)
|
70 |
with gr.Row():
|
71 |
+
output4 = gr.Image(label="")
|
72 |
output5 = gr.Image(label="")
|
73 |
output6 = gr.Image(label="")
|
74 |
with gr.Row():
|
75 |
+
magic4 = gr.Textbox(label="Generated Prompt", lines=2)
|
76 |
+
magic5 = gr.Textbox(label="Generated Prompt", lines=2)
|
77 |
+
magic6 = gr.Textbox(label="Generated Prompt", lines=2)
|
78 |
+
with gr.Row():
|
79 |
output7 = gr.Image(label="")
|
80 |
output8 = gr.Image(label="")
|
81 |
+
output9 = gr.Image(label="")
|
82 |
with gr.Row():
|
83 |
+
magic7 = gr.Textbox(label="Generated Prompt", lines=2)
|
84 |
+
magic8 = gr.Textbox(label="Generated Prompt", lines=2)
|
85 |
+
magic9 = gr.Textbox(label="Generated Prompt", lines=2)
|
86 |
|
87 |
+
model_name1.change(set_model, inputs=model_name1, outputs=[output1, output2, output3, output4, output5, output6, output7, output8, output9])
|
88 |
|
89 |
run.click(send_it, inputs=[magic1, model_name1], outputs=[output1])
|
90 |
run.click(send_it, inputs=[magic2, model_name1], outputs=[output2])
|
|
|
94 |
run.click(send_it, inputs=[magic6, model_name1], outputs=[output6])
|
95 |
run.click(send_it, inputs=[magic7, model_name1], outputs=[output7])
|
96 |
run.click(send_it, inputs=[magic8, model_name1], outputs=[output8])
|
97 |
+
run.click(send_it, inputs=[magic9, model_name1], outputs=[output9])
|
98 |
|
99 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic1])
|
100 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic2])
|
|
|
104 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic6])
|
105 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic7])
|
106 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic8])
|
107 |
+
see_prompts.click(text_it, inputs=[input_text], outputs=[magic9])
|
108 |
|
109 |
myface.queue(concurrency_count=200)
|
110 |
myface.launch(inline=True, show_api=False, max_threads=400)
|