tiny update
Browse files
app.py
CHANGED
|
@@ -24,6 +24,7 @@ class GradioApp:
|
|
| 24 |
# Lazy loading of models
|
| 25 |
if isinstance(self.models[model_name], str):
|
| 26 |
self.models[model_name] = torch.load(self.models[model_name], map_location='cpu')
|
|
|
|
| 27 |
|
| 28 |
img = torch.unsqueeze(self.models[model_name].val_transform(Image.open(img_file)), 0)
|
| 29 |
with torch.inference_mode():
|
|
|
|
| 24 |
# Lazy loading of models
|
| 25 |
if isinstance(self.models[model_name], str):
|
| 26 |
self.models[model_name] = torch.load(self.models[model_name], map_location='cpu')
|
| 27 |
+
self.models[model_name].eval()
|
| 28 |
|
| 29 |
img = torch.unsqueeze(self.models[model_name].val_transform(Image.open(img_file)), 0)
|
| 30 |
with torch.inference_mode():
|