Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -66,7 +66,17 @@ text_input = gr.inputs.Textbox(label="Prompt") # New input for the text prompt
|
|
| 66 |
# Define the output components for Gradio (including both image and text)
|
| 67 |
outputs = gr.Image(type="numpy", label="Output Image")
|
| 68 |
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 66 |
# Define the output components for Gradio (including both image and text)
|
| 67 |
outputs = gr.Image(type="numpy", label="Output Image")
|
| 68 |
|
| 69 |
+
# Define the text description within an HTML <div> element
|
| 70 |
+
description_html = """
|
| 71 |
+
<div>
|
| 72 |
+
<p>This is a project description. It demonstrates how to use Gradio with an image and text input to interact with an API.</p>
|
| 73 |
+
</div>
|
| 74 |
+
"""
|
| 75 |
+
|
| 76 |
+
# Launch the Gradio interface with the description below it
|
| 77 |
+
gr.Interface(
|
| 78 |
+
fn=get_results,
|
| 79 |
+
inputs=[image_input, text_input],
|
| 80 |
+
outputs=outputs,
|
| 81 |
+
description=description_html # Use the HTML description
|
| 82 |
+
).launch(share=False)
|