Commit
·
929f324
1
Parent(s):
9110c66
Comment out whoami function call and update snapshot_download to specify repo_type for improved clarity
Browse files- gradio_interface.py +3 -3
gradio_interface.py
CHANGED
@@ -6,7 +6,7 @@ import shutil
|
|
6 |
import os
|
7 |
from pathlib import Path
|
8 |
from huggingface_hub import whoami
|
9 |
-
whoami(token=os.getenv("HF_TOKEN"))
|
10 |
|
11 |
SUBMISSION_REPO = "SushantGautam/medvqa-submissions"
|
12 |
hub_dir = None
|
@@ -17,8 +17,8 @@ def get_hub_path():
|
|
17 |
if hub_dir and Path(hub_dir).exists():
|
18 |
shutil.rmtree(hub_dir, ignore_errors=True)
|
19 |
|
20 |
-
hub_path = snapshot_download(
|
21 |
-
|
22 |
hub_dir = os.path.dirname(hub_path) # More robust than split
|
23 |
return hub_path
|
24 |
|
|
|
6 |
import os
|
7 |
from pathlib import Path
|
8 |
from huggingface_hub import whoami
|
9 |
+
# whoami(token=os.getenv("HF_TOKEN"))
|
10 |
|
11 |
SUBMISSION_REPO = "SushantGautam/medvqa-submissions"
|
12 |
hub_dir = None
|
|
|
17 |
if hub_dir and Path(hub_dir).exists():
|
18 |
shutil.rmtree(hub_dir, ignore_errors=True)
|
19 |
|
20 |
+
hub_path = snapshot_download(repo_type="dataset",
|
21 |
+
repo_id=SUBMISSION_REPO, allow_patterns=['*.json'])
|
22 |
hub_dir = os.path.dirname(hub_path) # More robust than split
|
23 |
return hub_path
|
24 |
|