Spaces:
Sleeping
Sleeping
Commit
·
883b313
1
Parent(s):
4e2ea8a
Update app.py
Browse files
app.py
CHANGED
@@ -44,13 +44,12 @@ def predict_class(image):
|
|
44 |
# UI Design
|
45 |
def classify_image(image):
|
46 |
predicted_class = predict_class(image)
|
47 |
-
|
48 |
-
return output
|
49 |
|
50 |
inputs = gr.inputs.Image(label="Upload an image")
|
51 |
-
outputs = gr.outputs.
|
52 |
|
53 |
-
title = "
|
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()
|
|
|
44 |
# UI Design
|
45 |
def classify_image(image):
|
46 |
predicted_class = predict_class(image)
|
47 |
+
return image, predicted_class
|
|
|
48 |
|
49 |
inputs = gr.inputs.Image(label="Upload an image")
|
50 |
+
outputs = gr.outputs.Image(label="Uploaded Image"), gr.outputs.Textbox(label="Predicted Class", live=True)
|
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(inline=True)
|