mrmft commited on
Commit
5b2b054
1 Parent(s): 5287ded

Update kpe_ranker.py

Browse files
Files changed (1) hide show
  1. 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(file_path):
12
  TRAINED_MODEL_ADDR = model_path
13
  else:
14
- hf_hub_download(repo_id="lysandre/arxiv-nlp", filename="config.json")
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')