Spaces:
Sleeping
Sleeping
THardy98
commited on
Commit
·
ccdf48b
1
Parent(s):
71fa6ce
set gradio version to 3.50
Browse files
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: 🌖
|
|
| 4 |
colorFrom: gray
|
| 5 |
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version:
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: apache-2.0
|
|
|
|
| 4 |
colorFrom: gray
|
| 5 |
colorTo: blue
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 3.50
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: apache-2.0
|
app.py
CHANGED
|
@@ -11,8 +11,8 @@ def classify_image(img):
|
|
| 11 |
pred, idx, probs = learn.predict(img)
|
| 12 |
return dict(zip(categories, map(float, probs)))
|
| 13 |
|
| 14 |
-
image = gr.
|
| 15 |
-
label = gr.
|
| 16 |
examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
|
| 17 |
|
| 18 |
demo = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|
|
|
|
| 11 |
pred, idx, probs = learn.predict(img)
|
| 12 |
return dict(zip(categories, map(float, probs)))
|
| 13 |
|
| 14 |
+
image = gr.inputs.Image(shape=(192, 192))
|
| 15 |
+
label = gr.outputs.Label()
|
| 16 |
examples = ['dog.jpg', 'cat.jpg', 'dunno.jpg']
|
| 17 |
|
| 18 |
demo = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples=examples)
|