Pinwheel commited on
Commit
13a42ba
Β·
1 Parent(s): 909e5f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -90,7 +90,7 @@ def predict_image(image, model):
90
 
91
  # Load the EfficientNet model outside the function to avoid loading it multiple times
92
  model_path = 'vehicle.pt'
93
- model = load_model(model_path)
94
 
95
  # Gradio UI
96
  title = "Vehicle Collision Classification"
 
90
 
91
  # Load the EfficientNet model outside the function to avoid loading it multiple times
92
  model_path = 'vehicle.pt'
93
+ model = load_model(model_path, map_location=torch.device('cpu'))
94
 
95
  # Gradio UI
96
  title = "Vehicle Collision Classification"