Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -91,6 +91,10 @@ def segment_image(input_image, text_input):
|
|
91 |
|
92 |
# Limit the output to the top 6 key-value pairs
|
93 |
segmented_regions = segmented_regions[:6]
|
|
|
|
|
|
|
|
|
94 |
|
95 |
# Return the segmented images in descending order of similarity
|
96 |
return segmented_regions
|
@@ -98,7 +102,7 @@ def segment_image(input_image, text_input):
|
|
98 |
# Create Gradio components
|
99 |
input_image = gr.Textbox(label="Base64 Image", lines=8)
|
100 |
text_input = gr.Textbox(label="Text Input") # Use Textbox with a label
|
101 |
-
output_images = gr.outputs.JSON()
|
102 |
|
103 |
# Create a Gradio interface
|
104 |
-
gr.Interface(fn=segment_image, inputs=[input_image, text_input], outputs=
|
|
|
91 |
|
92 |
# Limit the output to the top 6 key-value pairs
|
93 |
segmented_regions = segmented_regions[:6]
|
94 |
+
|
95 |
+
# Print the top 6 results
|
96 |
+
for result in segmented_regions:
|
97 |
+
print(result)
|
98 |
|
99 |
# Return the segmented images in descending order of similarity
|
100 |
return segmented_regions
|
|
|
102 |
# Create Gradio components
|
103 |
input_image = gr.Textbox(label="Base64 Image", lines=8)
|
104 |
text_input = gr.Textbox(label="Text Input") # Use Textbox with a label
|
105 |
+
#output_images = gr.outputs.JSON()
|
106 |
|
107 |
# Create a Gradio interface
|
108 |
+
gr.Interface(fn=segment_image, inputs=[input_image, text_input], outputs=None).launch()
|