tyler cross
commited on
Commit
•
14148cc
1
Parent(s):
711e417
Added label for image classifier
Browse files- __pycache__/app.cpython-311.pyc +0 -0
- app.py +1 -1
__pycache__/app.cpython-311.pyc
CHANGED
Binary files a/__pycache__/app.cpython-311.pyc and b/__pycache__/app.cpython-311.pyc differ
|
|
app.py
CHANGED
@@ -12,7 +12,7 @@ def classify_image(img):
|
|
12 |
# Return the result
|
13 |
return {model.dls.vocab[i]: float(probs[i]) for i in range(len(model.dls.vocab))}
|
14 |
|
15 |
-
demo = gr.Interface(fn=classify_image, inputs=
|
16 |
|
17 |
if __name__ == "__main__":
|
18 |
demo.launch()
|
|
|
12 |
# Return the result
|
13 |
return {model.dls.vocab[i]: float(probs[i]) for i in range(len(model.dls.vocab))}
|
14 |
|
15 |
+
demo = gr.Interface(fn=classify_image, inputs=gr.Image(label = 'Upload an image of a dung beetle, a dolphin, or an elephant!'), outputs="label")
|
16 |
|
17 |
if __name__ == "__main__":
|
18 |
demo.launch()
|