Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -4,7 +4,7 @@ import sys
|
|
4 |
from pathlib import Path
|
5 |
|
6 |
models = [
|
7 |
-
|
8 |
{"name": "A Certain Model", "url": "JosephusCheung/ACertainModel"},
|
9 |
{"name": "A Certain Thing", "url": "JosephusCheung/ACertainThing"},
|
10 |
{"name": "A Certainity", "url": "JosephusCheung/ACertainty"},
|
@@ -231,7 +231,7 @@ models = [
|
|
231 |
|
232 |
current_model = models[0]
|
233 |
|
234 |
-
text_gen = gr.Interface.load("spaces/
|
235 |
|
236 |
models2 = []
|
237 |
for model in models:
|
@@ -262,7 +262,7 @@ with gr.Blocks() as myface:
|
|
262 |
|
263 |
with gr.Row():
|
264 |
with gr.Row():
|
265 |
-
input_text = gr.Textbox(label="Prompt idea",
|
266 |
# Model selection dropdown
|
267 |
model_name1 = gr.Dropdown(
|
268 |
label="Choose Model",
|
@@ -291,16 +291,8 @@ with gr.Blocks() as myface:
|
|
291 |
magic4 = gr.Textbox(label="Generated Prompt", lines=2)
|
292 |
magic5 = gr.Textbox(label="Generated Prompt", lines=2)
|
293 |
magic6 = gr.Textbox(label="Generated Prompt", lines=2)
|
294 |
-
with gr.Row():
|
295 |
-
output7 = gr.Image(label="")
|
296 |
-
output8 = gr.Image(label="")
|
297 |
-
output9 = gr.Image(label="")
|
298 |
-
with gr.Row():
|
299 |
-
magic7 = gr.Textbox(label="Generated Prompt", lines=2)
|
300 |
-
magic8 = gr.Textbox(label="Generated Prompt", lines=2)
|
301 |
-
magic9 = gr.Textbox(label="Generated Prompt", lines=2)
|
302 |
|
303 |
-
model_name1.change(set_model, inputs=model_name1, outputs=[output1, output2, output3, output4, output5, output6
|
304 |
|
305 |
run.click(send_it, inputs=[magic1, model_name1], outputs=[output1])
|
306 |
run.click(send_it, inputs=[magic2, model_name1], outputs=[output2])
|
@@ -308,9 +300,6 @@ with gr.Blocks() as myface:
|
|
308 |
run.click(send_it, inputs=[magic4, model_name1], outputs=[output4])
|
309 |
run.click(send_it, inputs=[magic5, model_name1], outputs=[output5])
|
310 |
run.click(send_it, inputs=[magic6, model_name1], outputs=[output6])
|
311 |
-
run.click(send_it, inputs=[magic7, model_name1], outputs=[output7])
|
312 |
-
run.click(send_it, inputs=[magic8, model_name1], outputs=[output8])
|
313 |
-
run.click(send_it, inputs=[magic9, model_name1], outputs=[output9])
|
314 |
|
315 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic1])
|
316 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic2])
|
@@ -318,9 +307,6 @@ with gr.Blocks() as myface:
|
|
318 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic4])
|
319 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic5])
|
320 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic6])
|
321 |
-
see_prompts.click(text_it, inputs=[input_text], outputs=[magic7])
|
322 |
-
see_prompts.click(text_it, inputs=[input_text], outputs=[magic8])
|
323 |
-
see_prompts.click(text_it, inputs=[input_text], outputs=[magic9])
|
324 |
|
325 |
myface.queue(concurrency_count=200)
|
326 |
myface.launch(inline=True, show_api=False, max_threads=400)
|
|
|
4 |
from pathlib import Path
|
5 |
|
6 |
models = [
|
7 |
+
{"name": "7 Pa", "url": "AIARTCHAN/7pa"},
|
8 |
{"name": "A Certain Model", "url": "JosephusCheung/ACertainModel"},
|
9 |
{"name": "A Certain Thing", "url": "JosephusCheung/ACertainThing"},
|
10 |
{"name": "A Certainity", "url": "JosephusCheung/ACertainty"},
|
|
|
231 |
|
232 |
current_model = models[0]
|
233 |
|
234 |
+
text_gen = gr.Interface.load("spaces/daspartho/prompt-extend")
|
235 |
|
236 |
models2 = []
|
237 |
for model in models:
|
|
|
262 |
|
263 |
with gr.Row():
|
264 |
with gr.Row():
|
265 |
+
input_text = gr.Textbox(label="Prompt idea", placeholder="", lines=1)
|
266 |
# Model selection dropdown
|
267 |
model_name1 = gr.Dropdown(
|
268 |
label="Choose Model",
|
|
|
291 |
magic4 = gr.Textbox(label="Generated Prompt", lines=2)
|
292 |
magic5 = gr.Textbox(label="Generated Prompt", lines=2)
|
293 |
magic6 = gr.Textbox(label="Generated Prompt", lines=2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
|
295 |
+
model_name1.change(set_model, inputs=model_name1, outputs=[output1, output2, output3, output4, output5, output6])
|
296 |
|
297 |
run.click(send_it, inputs=[magic1, model_name1], outputs=[output1])
|
298 |
run.click(send_it, inputs=[magic2, model_name1], outputs=[output2])
|
|
|
300 |
run.click(send_it, inputs=[magic4, model_name1], outputs=[output4])
|
301 |
run.click(send_it, inputs=[magic5, model_name1], outputs=[output5])
|
302 |
run.click(send_it, inputs=[magic6, model_name1], outputs=[output6])
|
|
|
|
|
|
|
303 |
|
304 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic1])
|
305 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic2])
|
|
|
307 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic4])
|
308 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic5])
|
309 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic6])
|
|
|
|
|
|
|
310 |
|
311 |
myface.queue(concurrency_count=200)
|
312 |
myface.launch(inline=True, show_api=False, max_threads=400)
|