Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -110,14 +110,17 @@ with gr.Blocks() as demo:
|
|
110 |
# Define the input components and add them to the layout
|
111 |
with gr.Row():
|
112 |
image_input = gr.inputs.Image()
|
113 |
-
|
114 |
-
|
115 |
# Define the output component and add it to the layout
|
116 |
with gr.Row():
|
117 |
-
|
|
|
|
|
|
|
118 |
# Define the event listener that connects the input and output components and triggers the function
|
119 |
-
button.click(fn=get_results, inputs=[image_input, text_input], outputs=output, api_name="get_results")
|
120 |
# Add the description below the layout
|
121 |
-
gr.Markdown(
|
122 |
# Launch the app
|
123 |
demo.launch(share=False)
|
|
|
110 |
# Define the input components and add them to the layout
|
111 |
with gr.Row():
|
112 |
image_input = gr.inputs.Image()
|
113 |
+
output = gr.Image(type="numpy", label="Output Image")
|
114 |
+
|
115 |
# Define the output component and add it to the layout
|
116 |
with gr.Row():
|
117 |
+
text_input = gr.inputs.Textbox(label="Prompt")
|
118 |
+
with gr.Row():
|
119 |
+
button = gr.Button("Run")
|
120 |
+
|
121 |
# Define the event listener that connects the input and output components and triggers the function
|
122 |
+
button.click(fn=get_results, inputs=[image_input, text_input],title="autoannotation", outputs=output, api_name="get_results")
|
123 |
# Add the description below the layout
|
124 |
+
gr.Markdown(description_html)
|
125 |
# Launch the app
|
126 |
demo.launch(share=False)
|