Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,7 +23,7 @@ labels = {
|
|
| 23 |
# Download the model file
|
| 24 |
def download_model():
|
| 25 |
url = "https://drive.google.com/uc?id=12700bE-pomYKoVQ214VrpBoJ7akXcTpL"
|
| 26 |
-
output = "
|
| 27 |
gdown.download(url, output, quiet=False)
|
| 28 |
return output
|
| 29 |
|
|
@@ -66,9 +66,9 @@ def classify_image(image):
|
|
| 66 |
return result
|
| 67 |
|
| 68 |
|
| 69 |
-
inputs = gr.
|
| 70 |
# outputs = gr.outputs.HTML() #uncomment for single class output
|
| 71 |
-
outputs = gr.
|
| 72 |
|
| 73 |
title = "<h1 style='text-align: center;'>Image Classifier</h1>"
|
| 74 |
description = "Upload an image and get the predicted class."
|
|
|
|
| 23 |
# Download the model file
|
| 24 |
def download_model():
|
| 25 |
url = "https://drive.google.com/uc?id=12700bE-pomYKoVQ214VrpBoJ7akXcTpL"
|
| 26 |
+
output = "modelV2Lmixed.keras"
|
| 27 |
gdown.download(url, output, quiet=False)
|
| 28 |
return output
|
| 29 |
|
|
|
|
| 66 |
return result
|
| 67 |
|
| 68 |
|
| 69 |
+
inputs = gr.components.Image(type="pil", label="Upload an image")
|
| 70 |
# outputs = gr.outputs.HTML() #uncomment for single class output
|
| 71 |
+
outputs = gr.components.Label(num_top_classes=4)
|
| 72 |
|
| 73 |
title = "<h1 style='text-align: center;'>Image Classifier</h1>"
|
| 74 |
description = "Upload an image and get the predicted class."
|