Spaces:
Runtime error
Runtime error
Commit
·
ee2cd5c
1
Parent(s):
bcc0316
Update app.py
Browse files
app.py
CHANGED
|
@@ -28,7 +28,5 @@ def predict(inp):
|
|
| 28 |
prediction =F.softmax(model(inp)[0], dim=0)
|
| 29 |
confidences = {classes[i]: float(prediction[i]) for i in range(5)}
|
| 30 |
return confidences
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
# gr.Interface(fn=predict, inputs=gr.Image(type="pil"),outputs=gr.Label(num_top_classes=4),title='Image classification',interpretation='default').launch(debug='True')
|
| 34 |
gr.Interface(predict, gr.inputs.Image(type="pil"),outputs='label',title='Image classification').launch(debug='True')
|
|
|
|
| 28 |
prediction =F.softmax(model(inp)[0], dim=0)
|
| 29 |
confidences = {classes[i]: float(prediction[i]) for i in range(5)}
|
| 30 |
return confidences
|
| 31 |
+
# gr.Interface(fn=predict, inputs=gr.Image(type="pil"),outputs=gr.Label(num_top_classes=4),title='Image classification',interpretation='default').launch(debug='True')
|
|
|
|
|
|
|
| 32 |
gr.Interface(predict, gr.inputs.Image(type="pil"),outputs='label',title='Image classification').launch(debug='True')
|