Spaces:
Runtime error
Runtime error
criticalDanger
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -12,9 +12,6 @@ def predict(image):
|
|
12 |
output = {item['label']: item['score'] for item in result}
|
13 |
print("Formatted prediction result:", output) # Debugging statement
|
14 |
return output
|
15 |
-
except Exception as e:
|
16 |
-
print("Error during prediction:", e) # Debugging statement
|
17 |
-
return {"error": str(e)}
|
18 |
|
19 |
# Create Gradio interface
|
20 |
with gr.Blocks() as iface:
|
|
|
12 |
output = {item['label']: item['score'] for item in result}
|
13 |
print("Formatted prediction result:", output) # Debugging statement
|
14 |
return output
|
|
|
|
|
|
|
15 |
|
16 |
# Create Gradio interface
|
17 |
with gr.Blocks() as iface:
|