Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -26,10 +26,10 @@ tokenizer = AutoTokenizer.from_pretrained(pretrained_path)
|
|
| 26 |
encoder = AutoModel.from_pretrained(pretrained_path).eval()
|
| 27 |
|
| 28 |
|
| 29 |
-
checkpoint_path = snapshot_download(repo_id="SinaLab/Nested", allow_patterns="checkpoints/")
|
| 30 |
|
| 31 |
args_path = hf_hub_download(
|
| 32 |
-
repo_id="SinaLab/Nested",
|
| 33 |
filename="args.json"
|
| 34 |
)
|
| 35 |
|
|
@@ -37,7 +37,7 @@ with open(args_path, 'r') as f:
|
|
| 37 |
args_data = json.load(f)
|
| 38 |
|
| 39 |
# Load model
|
| 40 |
-
with open("Nested/utils/tag_vocab.pkl", "rb") as f:
|
| 41 |
label_vocab = pickle.load(f)
|
| 42 |
|
| 43 |
|
|
|
|
| 26 |
encoder = AutoModel.from_pretrained(pretrained_path).eval()
|
| 27 |
|
| 28 |
|
| 29 |
+
checkpoint_path = snapshot_download(repo_id="https://huggingface.co/spaces/SinaLab/wojood-api/tree/main/Nested", allow_patterns="checkpoints/")
|
| 30 |
|
| 31 |
args_path = hf_hub_download(
|
| 32 |
+
repo_id="https://huggingface.co/spaces/SinaLab/wojood-api/tree/main/Nested",
|
| 33 |
filename="args.json"
|
| 34 |
)
|
| 35 |
|
|
|
|
| 37 |
args_data = json.load(f)
|
| 38 |
|
| 39 |
# Load model
|
| 40 |
+
with open("https://huggingface.co/spaces/SinaLab/wojood-api/tree/main/Nested/utils/tag_vocab.pkl", "rb") as f:
|
| 41 |
label_vocab = pickle.load(f)
|
| 42 |
|
| 43 |
|