kwang2049 commited on
Commit
b731827
β€’
1 Parent(s): d544db4

coref-spanbert-large-2021.03.10 folder

Browse files
config.json β†’ coref-spanbert-large-2021.03.10/config.json RENAMED
File without changes
{vocabulary β†’ coref-spanbert-large-2021.03.10/vocabulary}/.lock RENAMED
File without changes
{vocabulary β†’ coref-spanbert-large-2021.03.10/vocabulary}/non_padded_namespaces.txt RENAMED
File without changes
weights.th β†’ coref-spanbert-large-2021.03.10/weights.th RENAMED
File without changes
pipeline.py CHANGED
@@ -4,13 +4,14 @@ from long_coref.coref.prediction import CorefPredictor
4
  from long_coref.coref.utils import ArchiveContent
5
  from allennlp.common.params import Params
6
 
 
7
 
8
  class PreTrainedPipeline:
9
  def __init__(self, path=""):
10
  archive_content = ArchiveContent(
11
- archive_dir=path,
12
- weight_path=os.path.join(path, "weights.th"),
13
- config=Params.from_file(os.path.join(path, "config.json")),
14
  )
15
  self.predictor = CorefPredictor.from_extracted_archive(archive_content)
16
 
 
4
  from long_coref.coref.utils import ArchiveContent
5
  from allennlp.common.params import Params
6
 
7
+ CHECKPOINT = "coref-spanbert-large-2021.03.10"
8
 
9
  class PreTrainedPipeline:
10
  def __init__(self, path=""):
11
  archive_content = ArchiveContent(
12
+ archive_dir=os.path.join(path, CHECKPOINT),
13
+ weight_path=os.path.join(path, CHECKPOINT, "weights.th"),
14
+ config=Params.from_file(os.path.join(path, CHECKPOINT, "config.json")),
15
  )
16
  self.predictor = CorefPredictor.from_extracted_archive(archive_content)
17