Spaces:
Running
Running
Update app.py
Browse files
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
|
12 |
|
13 |
# Retrieve the token from the environment variables
|
14 |
token = os.environ.get("token")
|
15 |
|
16 |
-
|
17 |
-
|
|
|
18 |
repo_type="model",
|
19 |
-
|
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()
|