chansung commited on
Commit
197ae84
·
1 Parent(s): 44b42ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -8,8 +8,6 @@ import tensorflow as tf
8
  from transformers import ViTFeatureExtractor
9
  from huggingface_hub import from_pretrained_keras
10
 
11
- global MODEL
12
-
13
  PRETRAIN_CHECKPOINT = "google/vit-base-patch16-224-in21k"
14
  feature_extractor = ViTFeatureExtractor.from_pretrained(PRETRAIN_CHECKPOINT)
15
 
@@ -48,6 +46,8 @@ def preprocess_input(image):
48
  }
49
 
50
  def get_predictions(wb_token, image):
 
 
51
  if MODEL is None:
52
  wandb.login(key=wb_token)
53
  path = wandb.use_artifact('tfx-vit-pipeline/final_model:latest', type='model').download()
 
8
  from transformers import ViTFeatureExtractor
9
  from huggingface_hub import from_pretrained_keras
10
 
 
 
11
  PRETRAIN_CHECKPOINT = "google/vit-base-patch16-224-in21k"
12
  feature_extractor = ViTFeatureExtractor.from_pretrained(PRETRAIN_CHECKPOINT)
13
 
 
46
  }
47
 
48
  def get_predictions(wb_token, image):
49
+ print(MODEL)
50
+
51
  if MODEL is None:
52
  wandb.login(key=wb_token)
53
  path = wandb.use_artifact('tfx-vit-pipeline/final_model:latest', type='model').download()