Spaces:
Sleeping
Sleeping
adding a 3rd result output
Browse files
app.py
CHANGED
@@ -40,10 +40,10 @@ def process_image(image_input):
|
|
40 |
|
41 |
sorted_float_values = sorted(float_values, reverse=True)
|
42 |
print(sorted_float_values)
|
43 |
-
return [[
|
44 |
|
45 |
inputs = gr.inputs.Image(type="pil")
|
46 |
-
outputs = [gr.outputs.Textbox(label="Top Result"), gr.outputs.Textbox(label="Second Result")]
|
47 |
|
48 |
interface = gr.Interface(fn=process_image, inputs=inputs, outputs=outputs)
|
49 |
interface.launch()
|
|
|
40 |
|
41 |
sorted_float_values = sorted(float_values, reverse=True)
|
42 |
print(sorted_float_values)
|
43 |
+
return [[results[sorted_float_values[0]], sorted_float_values[0]], [results[sorted_float_values[1]], sorted_float_values[1]], [results[sorted_float_values[2]], sorted_float_values[2]]]
|
44 |
|
45 |
inputs = gr.inputs.Image(type="pil")
|
46 |
+
outputs = [gr.outputs.Textbox(label="Top Result"), gr.outputs.Textbox(label="Second Result"), gr.outputs.Textbox(label="Third Result")]
|
47 |
|
48 |
interface = gr.Interface(fn=process_image, inputs=inputs, outputs=outputs)
|
49 |
interface.launch()
|