Update app.py
Browse files
app.py
CHANGED
|
@@ -69,7 +69,7 @@ def classify_from_text(text_input):
|
|
| 69 |
result = f"Predicted: {predicted_class}\nConfidence: {confidence:.2f}%"
|
| 70 |
|
| 71 |
|
| 72 |
-
return
|
| 73 |
|
| 74 |
|
| 75 |
interface = gr.Interface(
|
|
@@ -80,7 +80,7 @@ interface = gr.Interface(
|
|
| 80 |
),
|
| 81 |
outputs=[
|
| 82 |
gr.Image(label="Sample Image"),
|
| 83 |
-
|
| 84 |
],
|
| 85 |
title="CNN Fruit Classification System",
|
| 86 |
description="Enter fruit name → CNN predicts fruit"
|
|
|
|
| 69 |
result = f"Predicted: {predicted_class}\nConfidence: {confidence:.2f}%"
|
| 70 |
|
| 71 |
|
| 72 |
+
return img, result
|
| 73 |
|
| 74 |
|
| 75 |
interface = gr.Interface(
|
|
|
|
| 80 |
),
|
| 81 |
outputs=[
|
| 82 |
gr.Image(label="Sample Image"),
|
| 83 |
+
gr.Textbox(label="Prediction Result") # ✅ UNCOMMENT THIS
|
| 84 |
],
|
| 85 |
title="CNN Fruit Classification System",
|
| 86 |
description="Enter fruit name → CNN predicts fruit"
|