Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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"
|