robocan commited on
Commit
dbf177b
1 Parent(s): bde2d24

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -8,18 +8,18 @@ from PIL import Image
8
  from torchvision import transforms,models
9
  from sklearn.preprocessing import LabelEncoder
10
  from gradio import Interface, Image, Label
11
- from huggingface_hub import Repository
12
 
13
  # Retrieve the token from the environment variables
14
  token = os.environ.get("token")
15
 
16
- repo = Repository(
17
- local_dir="SVD",
 
18
  repo_type="model",
19
- clone_from="robocan/GeoG_City",
20
  token=token
21
  )
22
- repo.git_pull()
23
 
24
  device = 'cpu'
25
  le = LabelEncoder()
 
8
  from torchvision import transforms,models
9
  from sklearn.preprocessing import LabelEncoder
10
  from gradio import Interface, Image, Label
11
+ from huggingface_hub import snapshot_download
12
 
13
  # Retrieve the token from the environment variables
14
  token = os.environ.get("token")
15
 
16
+ # Download the repository snapshot
17
+ local_dir = snapshot_download(
18
+ repo_id="robocan/GeoG_City",
19
  repo_type="model",
20
+ local_dir="SVD",
21
  token=token
22
  )
 
23
 
24
  device = 'cpu'
25
  le = LabelEncoder()