Spaces:
Sleeping
Sleeping
Fixed
Browse files
app.py
CHANGED
|
@@ -18,7 +18,8 @@ def predict_image(img):
|
|
| 18 |
resultado = predictor.predict(img) # ← Gradio pasa PIL.Image
|
| 19 |
if "error" in resultado:
|
| 20 |
return resultado["error"]
|
| 21 |
-
return f"🖋️ **{resultado['caligrafia']}** ({resultado['confidence']:.1%})"
|
|
|
|
| 22 |
|
| 23 |
# Interfaz Gradio
|
| 24 |
demo = gr.Interface(
|
|
|
|
| 18 |
resultado = predictor.predict(img) # ← Gradio pasa PIL.Image
|
| 19 |
if "error" in resultado:
|
| 20 |
return resultado["error"]
|
| 21 |
+
return f"🖋️ **{resultado['caligrafia']}** ({resultado['confidence']:.1%}) Probs: {resultado['probs']}"
|
| 22 |
+
|
| 23 |
|
| 24 |
# Interfaz Gradio
|
| 25 |
demo = gr.Interface(
|