Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ def get_x(r):
|
|
| 15 |
learner = from_pretrained_fastai(repo_id)
|
| 16 |
|
| 17 |
def inference(image):
|
| 18 |
-
label_predict,_,probs = learner.predict(
|
| 19 |
return f"This grapevine leave is {label_predict} with {100*probs[torch.argmax(probs)].item():.2f}% probability"
|
| 20 |
|
| 21 |
gr.Interface(
|
|
|
|
| 15 |
learner = from_pretrained_fastai(repo_id)
|
| 16 |
|
| 17 |
def inference(image):
|
| 18 |
+
label_predict,_,probs = learner.predict(image)
|
| 19 |
return f"This grapevine leave is {label_predict} with {100*probs[torch.argmax(probs)].item():.2f}% probability"
|
| 20 |
|
| 21 |
gr.Interface(
|