dhhd255 commited on
Commit
4f6d7ef
·
1 Parent(s): acbd515

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -25,13 +25,12 @@ with open(custom_model_file, 'wb') as f:
25
  f.write(custom_model_content)
26
 
27
  # Load the EfficientNet model onto the CPU
28
- model = torch.load(efficientnet_model_file)
29
 
30
  # Load your custom model onto the CPU
31
  model.load_state_dict(torch.load(custom_model_file, map_location=torch.device('cpu')))
32
  model.eval()
33
 
34
-
35
  # Define a function that takes an image as input and uses the model for inference
36
  def image_classifier(image):
37
  # Preprocess the input image
 
25
  f.write(custom_model_content)
26
 
27
  # Load the EfficientNet model onto the CPU
28
+ model = torch.load(efficientnet_model_file, map_location=torch.device('cpu'))
29
 
30
  # Load your custom model onto the CPU
31
  model.load_state_dict(torch.load(custom_model_file, map_location=torch.device('cpu')))
32
  model.eval()
33
 
 
34
  # Define a function that takes an image as input and uses the model for inference
35
  def image_classifier(image):
36
  # Preprocess the input image