chansung commited on
Commit
43a3926
1 Parent(s): b877d9d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -13,10 +13,8 @@ def load_model(tar_file: str='outputs/model.tar.gz'):
13
  model_path = 'model'
14
  return keras.models.load_model(model_path)
15
 
16
- hf_hub_download(repo_id='chansung/test_img_clf-model', filename='outputs/model.tar.gz')
17
- filenames = next(walk('.'), (None, None, []))[2] # [] if no file
18
- print(filenames)
19
- model = load_model()
20
  labels = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
21
 
22
  def classify_image(inp):
 
13
  model_path = 'model'
14
  return keras.models.load_model(model_path)
15
 
16
+ filepath = hf_hub_download(repo_id='chansung/test_img_clf-model', filename='outputs/model.tar.gz', force_filename='model.tar.gz')
17
+ model = load_model(tar_file=filepath)
 
 
18
  labels = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
19
 
20
  def classify_image(inp):