jpterry commited on
Commit
096b8bd
·
1 Parent(s): f3454eb
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -236,7 +236,7 @@ def predict_and_analyze(model_name, num_channels, dim, input_channel, image):
236
 
237
  print("Loading model")
238
 
239
- model_loading_name = model_path + "%s_%i_planet_detection" % (model_name, num_channels)
240
 
241
  if 'eff' in model_name:
242
  hparams = effnet_hparams[num_channels]
@@ -270,7 +270,7 @@ def predict_and_analyze(model_name, num_channels, dim, input_channel, image):
270
  # model = EfficientNetPreTrained.from_pretrained(model_loading_name)
271
  # model = AutoModel.from_pretrained(model_loading_name, trust_remote_code=True)
272
 
273
- model = AutoModelForImageClassification.from_pretrained(model_loading_name)
274
 
275
  # model = EfficientNet(dropout=hparams.dropout,
276
  # num_channels=hparams.num_channels,
 
236
 
237
  print("Loading model")
238
 
239
+ model_loading_name = "%s_%i_planet_detection" % (model_name, num_channels)
240
 
241
  if 'eff' in model_name:
242
  hparams = effnet_hparams[num_channels]
 
270
  # model = EfficientNetPreTrained.from_pretrained(model_loading_name)
271
  # model = AutoModel.from_pretrained(model_loading_name, trust_remote_code=True)
272
 
273
+ model = AutoModelForImageClassification.from_pretrained(model_path + model_loading_name)
274
 
275
  # model = EfficientNet(dropout=hparams.dropout,
276
  # num_channels=hparams.num_channels,