Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -218,7 +218,7 @@ models = [
|
|
218 |
|
219 |
current_model = models[0]
|
220 |
|
221 |
-
text_gen = gr.Interface.load("spaces/
|
222 |
|
223 |
models2 = []
|
224 |
for model in models:
|
@@ -249,7 +249,7 @@ with gr.Blocks() as myface:
|
|
249 |
|
250 |
with gr.Row():
|
251 |
with gr.Row():
|
252 |
-
input_text = gr.Textbox(label="Prompt idea",
|
253 |
# Model selection dropdown
|
254 |
model_name1 = gr.Dropdown(
|
255 |
label="Choose Model",
|
@@ -278,16 +278,8 @@ with gr.Blocks() as myface:
|
|
278 |
magic4 = gr.Textbox(label="Generated Prompt", lines=2)
|
279 |
magic5 = gr.Textbox(label="Generated Prompt", lines=2)
|
280 |
magic6 = gr.Textbox(label="Generated Prompt", lines=2)
|
281 |
-
with gr.Row():
|
282 |
-
output7 = gr.Image(label="")
|
283 |
-
output8 = gr.Image(label="")
|
284 |
-
output9 = gr.Image(label="")
|
285 |
-
with gr.Row():
|
286 |
-
magic7 = gr.Textbox(label="Generated Prompt", lines=2)
|
287 |
-
magic8 = gr.Textbox(label="Generated Prompt", lines=2)
|
288 |
-
magic9 = gr.Textbox(label="Generated Prompt", lines=2)
|
289 |
|
290 |
-
model_name1.change(set_model, inputs=model_name1, outputs=[output1, output2, output3, output4, output5, output6
|
291 |
|
292 |
run.click(send_it, inputs=[magic1, model_name1], outputs=[output1])
|
293 |
run.click(send_it, inputs=[magic2, model_name1], outputs=[output2])
|
@@ -295,9 +287,6 @@ with gr.Blocks() as myface:
|
|
295 |
run.click(send_it, inputs=[magic4, model_name1], outputs=[output4])
|
296 |
run.click(send_it, inputs=[magic5, model_name1], outputs=[output5])
|
297 |
run.click(send_it, inputs=[magic6, model_name1], outputs=[output6])
|
298 |
-
run.click(send_it, inputs=[magic7, model_name1], outputs=[output7])
|
299 |
-
run.click(send_it, inputs=[magic8, model_name1], outputs=[output8])
|
300 |
-
run.click(send_it, inputs=[magic9, model_name1], outputs=[output9])
|
301 |
|
302 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic1])
|
303 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic2])
|
@@ -305,9 +294,6 @@ with gr.Blocks() as myface:
|
|
305 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic4])
|
306 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic5])
|
307 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic6])
|
308 |
-
see_prompts.click(text_it, inputs=[input_text], outputs=[magic7])
|
309 |
-
see_prompts.click(text_it, inputs=[input_text], outputs=[magic8])
|
310 |
-
see_prompts.click(text_it, inputs=[input_text], outputs=[magic9])
|
311 |
|
312 |
myface.queue(concurrency_count=200)
|
313 |
myface.launch(inline=True, show_api=False, max_threads=400)
|
|
|
218 |
|
219 |
current_model = models[0]
|
220 |
|
221 |
+
text_gen = gr.Interface.load("spaces/daspartho/prompt-extend")
|
222 |
|
223 |
models2 = []
|
224 |
for model in models:
|
|
|
249 |
|
250 |
with gr.Row():
|
251 |
with gr.Row():
|
252 |
+
input_text = gr.Textbox(label="Prompt idea", placeholder="Mystical zen garden", lines=1)
|
253 |
# Model selection dropdown
|
254 |
model_name1 = gr.Dropdown(
|
255 |
label="Choose Model",
|
|
|
278 |
magic4 = gr.Textbox(label="Generated Prompt", lines=2)
|
279 |
magic5 = gr.Textbox(label="Generated Prompt", lines=2)
|
280 |
magic6 = gr.Textbox(label="Generated Prompt", lines=2)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
281 |
|
282 |
+
model_name1.change(set_model, inputs=model_name1, outputs=[output1, output2, output3, output4, output5, output6])
|
283 |
|
284 |
run.click(send_it, inputs=[magic1, model_name1], outputs=[output1])
|
285 |
run.click(send_it, inputs=[magic2, model_name1], outputs=[output2])
|
|
|
287 |
run.click(send_it, inputs=[magic4, model_name1], outputs=[output4])
|
288 |
run.click(send_it, inputs=[magic5, model_name1], outputs=[output5])
|
289 |
run.click(send_it, inputs=[magic6, model_name1], outputs=[output6])
|
|
|
|
|
|
|
290 |
|
291 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic1])
|
292 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic2])
|
|
|
294 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic4])
|
295 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic5])
|
296 |
see_prompts.click(text_it, inputs=[input_text], outputs=[magic6])
|
|
|
|
|
|
|
297 |
|
298 |
myface.queue(concurrency_count=200)
|
299 |
myface.launch(inline=True, show_api=False, max_threads=400)
|