Spaces:
Sleeping
Sleeping
Commit
·
6184be6
1
Parent(s):
2290b3f
Update app.py
Browse files
app.py
CHANGED
@@ -149,7 +149,8 @@ def predict_beetle(img):
|
|
149 |
# conf_dict_lst.append(str(conf_dict)[1:-1]) # remove dictionary brackets
|
150 |
# result = list(zip(image_lst, conf_dict_lst))
|
151 |
# print(f"Classification processed - {i}")
|
152 |
-
|
|
|
153 |
|
154 |
|
155 |
# gradio app
|
@@ -167,6 +168,6 @@ with gr.Blocks(css=css) as demo:
|
|
167 |
btn = gr.Button("Classify")
|
168 |
|
169 |
# Set the gallery layout and height directly in the constructor
|
170 |
-
gallery = gr.Gallery(label="Show images", show_label=True, elem_id="gallery")
|
171 |
btn.click(predict_beetle, inputs, gallery)
|
172 |
-
demo.launch(debug=True, show_error=True
|
|
|
149 |
# conf_dict_lst.append(str(conf_dict)[1:-1]) # remove dictionary brackets
|
150 |
# result = list(zip(image_lst, conf_dict_lst))
|
151 |
# print(f"Classification processed - {i}")
|
152 |
+
result = list(zip([img], ["labelzzzzz"]))
|
153 |
+
return(result)
|
154 |
|
155 |
|
156 |
# gradio app
|
|
|
168 |
btn = gr.Button("Classify")
|
169 |
|
170 |
# Set the gallery layout and height directly in the constructor
|
171 |
+
gallery = gr.Gallery(label="Show images", show_label=True, elem_id="gallery", columns=8, height="auto")
|
172 |
btn.click(predict_beetle, inputs, gallery)
|
173 |
+
demo.launch(debug=True, show_error=True)
|