Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -92,17 +92,6 @@ with iface:
|
|
92 |
gr.Markdown("Disclaimer: This model is not perfect and may make mistakes. Use at your own risk.")
|
93 |
|
94 |
with gr.Tabs():
|
95 |
-
with gr.Tab("Combined Predictions"):
|
96 |
-
with gr.Row():
|
97 |
-
image_input1 = gr.Image(type="pil", label="Upload Image")
|
98 |
-
combined_output = gr.Label(label="Predicted Tags", num_top_classes=10)
|
99 |
-
predict_btn1 = gr.Button("Analyze")
|
100 |
-
predict_btn1.click(
|
101 |
-
fn=process_image_combined_tags,
|
102 |
-
inputs=image_input1,
|
103 |
-
outputs=combined_output
|
104 |
-
)
|
105 |
-
|
106 |
with gr.Tab("Categorical Predictions"):
|
107 |
with gr.Row():
|
108 |
image_input2 = gr.Image(type="pil", label="Upload Image")
|
@@ -118,5 +107,19 @@ with iface:
|
|
118 |
outputs=[type_output, scene_output, expression_output, clothing_output]
|
119 |
)
|
120 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
121 |
if __name__ == "__main__":
|
122 |
iface.launch()
|
|
|
92 |
gr.Markdown("Disclaimer: This model is not perfect and may make mistakes. Use at your own risk.")
|
93 |
|
94 |
with gr.Tabs():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
95 |
with gr.Tab("Categorical Predictions"):
|
96 |
with gr.Row():
|
97 |
image_input2 = gr.Image(type="pil", label="Upload Image")
|
|
|
107 |
outputs=[type_output, scene_output, expression_output, clothing_output]
|
108 |
)
|
109 |
|
110 |
+
with gr.Tab("Combined Predictions"):
|
111 |
+
with gr.Row():
|
112 |
+
image_input1 = gr.Image(type="pil", label="Upload Image")
|
113 |
+
with gr.Row():
|
114 |
+
combined_output = gr.Label(label="Predicted Tags", num_top_classes=10)
|
115 |
+
predict_btn1 = gr.Button("Analyze")
|
116 |
+
predict_btn1.click(
|
117 |
+
fn=process_image_combined_tags,
|
118 |
+
inputs=image_input1,
|
119 |
+
outputs=combined_output
|
120 |
+
)
|
121 |
+
|
122 |
+
|
123 |
+
|
124 |
if __name__ == "__main__":
|
125 |
iface.launch()
|