small fix agen
Browse files
app.py
CHANGED
|
@@ -33,7 +33,7 @@ class GradioApp:
|
|
| 33 |
|
| 34 |
img = model_transforms[model_name](Image.open(img_file)).unsqueeze(0)
|
| 35 |
with torch.inference_mode():
|
| 36 |
-
preds = torch.softmax(self.models[model_name](img)[0], dim=0)
|
| 37 |
return dict(zip(self.classes, preds))
|
| 38 |
|
| 39 |
def launch(self):
|
|
|
|
| 33 |
|
| 34 |
img = model_transforms[model_name](Image.open(img_file)).unsqueeze(0)
|
| 35 |
with torch.inference_mode():
|
| 36 |
+
preds = torch.softmax(self.models[model_name](img)[0], dim=0).cpu().numpy()
|
| 37 |
return dict(zip(self.classes, preds))
|
| 38 |
|
| 39 |
def launch(self):
|