Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -4,9 +4,11 @@ import gradio as gr
|
|
4 |
from huggingface_hub import snapshot_download
|
5 |
import os
|
6 |
|
|
|
|
|
7 |
def load_model(repo_id):
|
8 |
# Download the snapshot
|
9 |
-
download_dir = snapshot_download(repo_id, token=
|
10 |
print(f"Downloaded snapshot directory: {download_dir}")
|
11 |
|
12 |
# Check the contents of the directory
|
|
|
4 |
from huggingface_hub import snapshot_download
|
5 |
import os
|
6 |
|
7 |
+
hf_token = os.getenv("HF_TOKEN") # This will be automatically available in your Space
|
8 |
+
|
9 |
def load_model(repo_id):
|
10 |
# Download the snapshot
|
11 |
+
download_dir = snapshot_download(repo_id, token=hf_token)
|
12 |
print(f"Downloaded snapshot directory: {download_dir}")
|
13 |
|
14 |
# Check the contents of the directory
|