Spaces:
Sleeping
Sleeping
Commit
·
cbb0a6b
1
Parent(s):
3e7dbba
Update app.py
Browse files
app.py
CHANGED
@@ -44,12 +44,13 @@ def predict_class(image):
|
|
44 |
# UI Design
|
45 |
def classify_image(image):
|
46 |
predicted_class = predict_class(image)
|
47 |
-
|
|
|
48 |
|
49 |
inputs = gr.inputs.Image(label="Upload an image")
|
50 |
-
outputs = gr.outputs.
|
51 |
|
52 |
-
title = "Image Classifier"
|
53 |
description = "Upload an image and get the predicted class."
|
54 |
|
55 |
-
gr.Interface(fn=classify_image, inputs=inputs, outputs=outputs, title=title, description=description).launch(
|
|
|
44 |
# UI Design
|
45 |
def classify_image(image):
|
46 |
predicted_class = predict_class(image)
|
47 |
+
output = f"<h2>Predicted Class:</h2><p>{predicted_class}</p>"
|
48 |
+
return output
|
49 |
|
50 |
inputs = gr.inputs.Image(label="Upload an image")
|
51 |
+
outputs = gr.outputs.HTML()
|
52 |
|
53 |
+
title = "<h1 style='text-align: center;'>Image Classifier</h1>"
|
54 |
description = "Upload an image and get the predicted class."
|
55 |
|
56 |
+
gr.Interface(fn=classify_image, inputs=inputs, outputs=outputs, title=title, description=description).launch()
|