mikachou commited on
Commit
401e893
β€’
1 Parent(s): 4befa14

remove .h5 file from app, use hf_hub instead

Browse files
Files changed (3) hide show
  1. app.py +4 -1
  2. requirements.txt +4 -0
  3. tf_model.h5 +0 -3
app.py CHANGED
@@ -1,7 +1,10 @@
1
  import tensorflow as tf
 
2
  import gradio as gr
3
 
4
- model = tf.keras.models.load_model('tf_model.h5')
 
 
5
  print(model.summary())
6
 
7
  dogs_breeds = ['Chihuahua',
1
  import tensorflow as tf
2
+ from huggingface_hub import hf_hub_download
3
  import gradio as gr
4
 
5
+ tf_model = hf_hub_download(repo_id='mikachou/dog-breed-classifier', filename='tf_model.h5')
6
+
7
+ model = tf.keras.models.load_model(tf_model)
8
  print(model.summary())
9
 
10
  dogs_breeds = ['Chihuahua',
requirements.txt CHANGED
@@ -18,6 +18,7 @@ cryptography==37.0.2
18
  cycler==0.11.0
19
  fastapi==0.78.0
20
  ffmpy==0.3.0
 
21
  flatbuffers==1.12
22
  fonttools==4.33.3
23
  frozenlist==1.3.0
@@ -30,6 +31,7 @@ gradio==3.0.20
30
  grpcio==1.47.0
31
  h11==0.13.0
32
  h5py==3.7.0
 
33
  idna==3.3
34
  importlib-metadata==4.12.0
35
  Jinja2==3.1.2
@@ -66,6 +68,7 @@ pyparsing==3.0.9
66
  python-dateutil==2.8.2
67
  python-multipart==0.0.5
68
  pytz==2022.1
 
69
  requests==2.28.0
70
  requests-oauthlib==1.3.1
71
  rsa==4.8
@@ -79,6 +82,7 @@ tensorflow==2.8.2
79
  tensorflow-estimator==2.8.0
80
  tensorflow-io-gcs-filesystem==0.26.0
81
  termcolor==1.1.0
 
82
  typing_extensions==4.2.0
83
  uc-micro-py==1.0.1
84
  urllib3==1.26.9
18
  cycler==0.11.0
19
  fastapi==0.78.0
20
  ffmpy==0.3.0
21
+ filelock==3.7.1
22
  flatbuffers==1.12
23
  fonttools==4.33.3
24
  frozenlist==1.3.0
31
  grpcio==1.47.0
32
  h11==0.13.0
33
  h5py==3.7.0
34
+ huggingface-hub==0.8.1
35
  idna==3.3
36
  importlib-metadata==4.12.0
37
  Jinja2==3.1.2
68
  python-dateutil==2.8.2
69
  python-multipart==0.0.5
70
  pytz==2022.1
71
+ PyYAML==6.0
72
  requests==2.28.0
73
  requests-oauthlib==1.3.1
74
  rsa==4.8
82
  tensorflow-estimator==2.8.0
83
  tensorflow-io-gcs-filesystem==0.26.0
84
  termcolor==1.1.0
85
+ tqdm==4.64.0
86
  typing_extensions==4.2.0
87
  uc-micro-py==1.0.1
88
  urllib3==1.26.9
tf_model.h5 DELETED
@@ -1,3 +0,0 @@
1
- version https://git-lfs.github.com/spec/v1
2
- oid sha256:73e923c10641dbb68b7c19eff7f91609a93a6f21724ce2d6c4094f4e2e5b5293
3
- size 363489560