Backedman commited on
Commit
186d760
1 Parent(s): c378ae2

Upload QApipeline

Browse files
Files changed (3) hide show
  1. QBModelConfig.py +1 -1
  2. QBModelWrapper.py +10 -0
  3. README.md +1 -1
QBModelConfig.py CHANGED
@@ -6,4 +6,4 @@ class QBModelConfig(PretrainedConfig):
6
 
7
  def __init__(self, **kwargs):
8
  super().__init__( **kwargs)
9
- self.torch_dtype = torch.float16
 
6
 
7
  def __init__(self, **kwargs):
8
  super().__init__( **kwargs)
9
+ self.torch_dtype = torch.float32
QBModelWrapper.py CHANGED
@@ -3,10 +3,20 @@ from transformers import PreTrainedModel
3
  from transformers import PretrainedConfig
4
  from QBModelConfig import QBModelConfig
5
  from qbmodel import QuizBowlModel
 
 
 
 
6
 
7
  class QBModelWrapper(PreTrainedModel):
8
  config_class= QBModelConfig
9
  config = QBModelConfig
 
 
 
 
 
 
10
 
11
  def __init__(self, config):
12
  super().__init__(config)
 
3
  from transformers import PretrainedConfig
4
  from QBModelConfig import QBModelConfig
5
  from qbmodel import QuizBowlModel
6
+ from huggingface_hub import hf_hub_download
7
+
8
+ REPO_ID = "Backedman/TriviaAnsweringMachineREAL"
9
+ FILENAME = "models/Mythology_tfidf.pkl"
10
 
11
  class QBModelWrapper(PreTrainedModel):
12
  config_class= QBModelConfig
13
  config = QBModelConfig
14
+
15
+ hf_hub_download(repo_id=REPO_ID, filename='tfidf_model.py', local_dir='')
16
+ hf_hub_download(repo_id=REPO_ID, filename='question_categorizer.py', local_dir='')
17
+ hf_hub_download(repo_id=REPO_ID, filename='models/categorizer', local_dir='')
18
+
19
+
20
 
21
  def __init__(self, config):
22
  super().__init__(config)
README.md CHANGED
@@ -1,7 +1,7 @@
1
  ---
2
- license: mit
3
  language:
4
  - en
 
5
  pipeline_tag: question-answering
6
  ---
7
  The evaluation of this project is to answer trivia questions. You do
 
1
  ---
 
2
  language:
3
  - en
4
+ license: mit
5
  pipeline_tag: question-answering
6
  ---
7
  The evaluation of this project is to answer trivia questions. You do