Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -29,6 +29,8 @@ def predict(inp):
|
|
| 29 |
with torch.no_grad():
|
| 30 |
prediction = torch.nn.functional.softmax(model(inp)[0], dim=0)
|
| 31 |
return {LABELS[i]: float(prediction[i]) for i in range(2)}
|
|
|
|
|
|
|
| 32 |
|
| 33 |
-
iface = gr.Interface(predict, inputs=gr.inputs.Image(), outputs="label", title=title, description=description)
|
| 34 |
iface.launch()
|
|
|
|
| 29 |
with torch.no_grad():
|
| 30 |
prediction = torch.nn.functional.softmax(model(inp)[0], dim=0)
|
| 31 |
return {LABELS[i]: float(prediction[i]) for i in range(2)}
|
| 32 |
+
|
| 33 |
+
examples = [['VWUP.jpg']]
|
| 34 |
|
| 35 |
+
iface = gr.Interface(predict, inputs=gr.inputs.Image(), outputs="label", title=title, description=description, examples=examples)
|
| 36 |
iface.launch()
|