Spaces:
Sleeping
Sleeping
Fix Gradio server binding for HF Spaces
Browse files
app.py
CHANGED
|
@@ -13,9 +13,9 @@ def classify_image(img):
|
|
| 13 |
pred,idx,probs = learn.predict(img)
|
| 14 |
return dict(zip(categories, map(float,probs)))
|
| 15 |
|
| 16 |
-
image = gr.
|
| 17 |
-
label = gr.
|
| 18 |
examples = ['dog.jpg', 'cat.jpg','dunno.jpg']
|
| 19 |
|
| 20 |
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples = examples)
|
| 21 |
-
intf.launch(
|
|
|
|
| 13 |
pred,idx,probs = learn.predict(img)
|
| 14 |
return dict(zip(categories, map(float,probs)))
|
| 15 |
|
| 16 |
+
image = gr.Image(shape=(192,192))
|
| 17 |
+
label = gr.Label()
|
| 18 |
examples = ['dog.jpg', 'cat.jpg','dunno.jpg']
|
| 19 |
|
| 20 |
intf = gr.Interface(fn=classify_image, inputs=image, outputs=label, examples = examples)
|
| 21 |
+
intf.launch(server_name="0.0.0.0", server_port=7860)
|