YUGOROU commited on
Commit
1b928a8
·
1 Parent(s): a316ec5

Update app.py

Browse files

ignore_mismatched_sizes=True

Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -13,7 +13,9 @@ BASE_MODEL = "google/vit-base-patch16-224"
13
  def load_model():
14
  processor = AutoImageProcessor.from_pretrained(BASE_MODEL)
15
  model = ViTForImageClassification.from_pretrained(
16
- BASE_MODEL, num_labels=3
 
 
17
  )
18
  weights_path = hf_hub_download(repo_id=MODEL_REPO, filename=MODEL_FILE)
19
  state_dict = load_file(weights_path)
 
13
  def load_model():
14
  processor = AutoImageProcessor.from_pretrained(BASE_MODEL)
15
  model = ViTForImageClassification.from_pretrained(
16
+ BASE_MODEL,
17
+ num_labels=3,
18
+ ignore_mismatched_sizes=True
19
  )
20
  weights_path = hf_hub_download(repo_id=MODEL_REPO, filename=MODEL_FILE)
21
  state_dict = load_file(weights_path)