Spaces:
Runtime error
Runtime error
Update kpe_ranker.py
Browse files- kpe_ranker.py +2 -2
kpe_ranker.py
CHANGED
@@ -8,10 +8,10 @@ from huggingface_hub import hf_hub_download
|
|
8 |
class KpeRanker:
|
9 |
def __init__(self):
|
10 |
model_path = "/root/.cache/huggingface/hub/models--ahdsoft--persian-keyphrase-extraction-model/trained_model_10000.pt"
|
11 |
-
if os.path.isfile(
|
12 |
TRAINED_MODEL_ADDR = model_path
|
13 |
else:
|
14 |
-
hf_hub_download(repo_id="
|
15 |
TRAINED_MODEL_ADDR = model_path
|
16 |
|
17 |
# TRAINED_MODEL_ADDR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'trained_model', 'trained_model_10000.pt')
|
|
|
8 |
class KpeRanker:
|
9 |
def __init__(self):
|
10 |
model_path = "/root/.cache/huggingface/hub/models--ahdsoft--persian-keyphrase-extraction-model/trained_model_10000.pt"
|
11 |
+
if os.path.isfile(model_path):
|
12 |
TRAINED_MODEL_ADDR = model_path
|
13 |
else:
|
14 |
+
hf_hub_download(repo_id="ahdsoft/persian-keyphrase-extraction-model", filename="trained_model_10000.pt")
|
15 |
TRAINED_MODEL_ADDR = model_path
|
16 |
|
17 |
# TRAINED_MODEL_ADDR = os.path.join(os.path.dirname(os.path.abspath(__file__)), 'trained_model', 'trained_model_10000.pt')
|