CindyBSydney
commited on
Commit
•
ccca058
1
Parent(s):
70a156f
Update app.py
Browse files
app.py
CHANGED
@@ -55,13 +55,17 @@ def classify_image(uploaded_image):
|
|
55 |
|
56 |
return f"Class: {predicted_class_name}, Probability: {predicted_probability:.2f}%", None
|
57 |
|
58 |
-
# Create Gradio interface
|
59 |
iface = gr.Interface(
|
60 |
-
classify_image,
|
61 |
inputs=File(type="filepath"),
|
62 |
-
|
63 |
-
title="Gastric Image Classifier",
|
64 |
-
description="Upload
|
|
|
|
|
|
|
|
|
|
|
65 |
)
|
66 |
|
67 |
# Run the Gradio app
|
|
|
55 |
|
56 |
return f"Class: {predicted_class_name}, Probability: {predicted_probability:.2f}%", None
|
57 |
|
|
|
58 |
iface = gr.Interface(
|
59 |
+
fn=classify_image,
|
60 |
inputs=File(type="filepath"),
|
61 |
+
outputs=gr.Image(plot=True),
|
62 |
+
title="GastroHub AI Gastric Image Classifier",
|
63 |
+
description="Upload an image to classify it as normal or abnormal.",
|
64 |
+
article="Above is a sample image to test the results of the model. Click it to see the results.",
|
65 |
+
examples=[
|
66 |
+
["Gastric_Images/Ladybug.png"],
|
67 |
+
],
|
68 |
+
allow_flagging="never",
|
69 |
)
|
70 |
|
71 |
# Run the Gradio app
|