Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -57,11 +57,15 @@ def get_results(image, prompt):
|
|
| 57 |
|
| 58 |
return output_image
|
| 59 |
|
|
|
|
| 60 |
# Define the input components for Gradio (adding a new input for the prompt)
|
| 61 |
image_input = gr.inputs.Image()
|
| 62 |
text_input = gr.inputs.Textbox(label="Prompt") # New input for the text prompt
|
| 63 |
|
|
|
|
| 64 |
# Define the output components for Gradio (including both image and text)
|
|
|
|
|
|
|
| 65 |
description = "This is a project description. It demonstrates how to use Gradio with an image and text input to interact with an API."
|
| 66 |
|
| 67 |
# Launch the Gradio interface with the description
|
|
|
|
| 57 |
|
| 58 |
return output_image
|
| 59 |
|
| 60 |
+
|
| 61 |
# Define the input components for Gradio (adding a new input for the prompt)
|
| 62 |
image_input = gr.inputs.Image()
|
| 63 |
text_input = gr.inputs.Textbox(label="Prompt") # New input for the text prompt
|
| 64 |
|
| 65 |
+
|
| 66 |
# Define the output components for Gradio (including both image and text)
|
| 67 |
+
outputs = gr.Image(type="numpy", label="Output Image")
|
| 68 |
+
|
| 69 |
description = "This is a project description. It demonstrates how to use Gradio with an image and text input to interact with an API."
|
| 70 |
|
| 71 |
# Launch the Gradio interface with the description
|