Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -67,6 +67,8 @@ def send_it1(inputs, model_choice):
|
|
67 |
|
68 |
Image.fromarray(output1).save(image_path)
|
69 |
|
|
|
|
|
70 |
return output1
|
71 |
|
72 |
|
@@ -146,21 +148,21 @@ with gr.Blocks(css=css) as myface:
|
|
146 |
input_text=gr.Textbox(label="Prompt Idea",lines=2)
|
147 |
use_short=gr.Button("Use Short Prompt")
|
148 |
see_prompts=gr.Button("Extend Idea")
|
149 |
-
|
150 |
with gr.Row():
|
151 |
with gr.Column(scale=100):
|
152 |
-
saved_output = gr.
|
153 |
-
|
154 |
def short_prompt(inputs):
|
155 |
return(inputs)
|
156 |
|
157 |
use_short.click(short_prompt,inputs=[input_text],outputs=magic1)
|
158 |
see_prompts.click(text_it1,inputs=[input_text],outputs=magic1)
|
159 |
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
|
165 |
myface.queue(concurrency_count=200)
|
166 |
myface.launch(inline=True, show_api=False, max_threads=400)
|
|
|
67 |
|
68 |
Image.fromarray(output1).save(image_path)
|
69 |
|
70 |
+
saved_output.update(list_saved_prompts_and_images())
|
71 |
+
|
72 |
return output1
|
73 |
|
74 |
|
|
|
148 |
input_text=gr.Textbox(label="Prompt Idea",lines=2)
|
149 |
use_short=gr.Button("Use Short Prompt")
|
150 |
see_prompts=gr.Button("Extend Idea")
|
151 |
+
|
152 |
with gr.Row():
|
153 |
with gr.Column(scale=100):
|
154 |
+
saved_output = gr.HTML(label=list_saved_prompts_and_images(), live=True)
|
155 |
+
|
156 |
def short_prompt(inputs):
|
157 |
return(inputs)
|
158 |
|
159 |
use_short.click(short_prompt,inputs=[input_text],outputs=magic1)
|
160 |
see_prompts.click(text_it1,inputs=[input_text],outputs=magic1)
|
161 |
|
162 |
+
# Reasoning: Link functions to Gradio components 🎛️
|
163 |
+
model_name1.change(set_model, inputs=model_name1, outputs=[output1])
|
164 |
+
run.click(send_it1, inputs=[magic1, model_name1], outputs=[output1])
|
165 |
+
#saved_output.set(list_saved_prompts_and_images)
|
166 |
|
167 |
myface.queue(concurrency_count=200)
|
168 |
myface.launch(inline=True, show_api=False, max_threads=400)
|