Spaces:
Runtime error
Runtime error
update
Browse files
app.py
CHANGED
@@ -91,7 +91,7 @@ def meme_generate(img, prompt): #prompt, generated_txt): #, input_prompt_sql ):
|
|
91 |
final_solution = solution
|
92 |
|
93 |
meme_image = write_on_image(final_solution)
|
94 |
-
return meme_image #final_solution #display_output, new_prompt #generated_txt+prompt
|
95 |
|
96 |
|
97 |
demo = gr.Blocks()
|
@@ -122,12 +122,15 @@ with demo:
|
|
122 |
#input_word = gr.Textbox(placeholder="Enter a word here to generate text ...")
|
123 |
#with gr.Row():
|
124 |
#generated_txt = gr.Textbox(lines=7, visible = True)
|
|
|
|
|
125 |
output_image = gr.Image() #type="filepath", shape=(256,256))
|
126 |
-
|
|
|
127 |
b1 = gr.Button("Generate")
|
128 |
#b2 = gr.Button("Generate Image")
|
129 |
|
130 |
-
b1.click(meme_generate, inputs=[in_image, input_prompt], outputs=output_image) #input_word #input_prompt_dalle2 #input_prompt_sql #example_prompt
|
131 |
#b2.click(poem_to_image, poem_txt, output_image)
|
132 |
#examples=examples
|
133 |
|
|
|
91 |
final_solution = solution
|
92 |
|
93 |
meme_image = write_on_image(final_solution)
|
94 |
+
return meme_image, final_solution #final_solution #display_output, new_prompt #generated_txt+prompt
|
95 |
|
96 |
|
97 |
demo = gr.Blocks()
|
|
|
122 |
#input_word = gr.Textbox(placeholder="Enter a word here to generate text ...")
|
123 |
#with gr.Row():
|
124 |
#generated_txt = gr.Textbox(lines=7, visible = True)
|
125 |
+
|
126 |
+
with gr.Row():
|
127 |
output_image = gr.Image() #type="filepath", shape=(256,256))
|
128 |
+
output_prompt = gr.Textbox(label="Text generated", lines=5)
|
129 |
+
|
130 |
b1 = gr.Button("Generate")
|
131 |
#b2 = gr.Button("Generate Image")
|
132 |
|
133 |
+
b1.click(meme_generate, inputs=[in_image, input_prompt], outputs=[output_image,output_prompt]) #input_word #input_prompt_dalle2 #input_prompt_sql #example_prompt
|
134 |
#b2.click(poem_to_image, poem_txt, output_image)
|
135 |
#examples=examples
|
136 |
|