Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -101,7 +101,8 @@ def process_image(img):
|
|
101 |
buffered = io.BytesIO()
|
102 |
pil_image.save(buffered, format="PNG")
|
103 |
img_base64 = base64.b64encode(buffered.getvalue()).decode()
|
104 |
-
|
|
|
105 |
return f"{weight} kg (Confidence: {confidence:.2f}%)", ist_time, img_base64, gr.update(visible=True)
|
106 |
|
107 |
# Gradio Interface Setup for Hugging Face
|
|
|
101 |
buffered = io.BytesIO()
|
102 |
pil_image.save(buffered, format="PNG")
|
103 |
img_base64 = base64.b64encode(buffered.getvalue()).decode()
|
104 |
+
|
105 |
+
# Return the detected weight and processed image for Gradio
|
106 |
return f"{weight} kg (Confidence: {confidence:.2f}%)", ist_time, img_base64, gr.update(visible=True)
|
107 |
|
108 |
# Gradio Interface Setup for Hugging Face
|