Spaces:
Sleeping
Sleeping
Update predictor.py
Browse files- predictor.py +2 -2
predictor.py
CHANGED
|
@@ -8,7 +8,7 @@ score_map = {'A': 5, 'B': 4, 'C': 3, 'D': 2, 'E': 1}
|
|
| 8 |
|
| 9 |
|
| 10 |
class SentenceExtractor:
|
| 11 |
-
def __init__(self, eval_keywords_path: str, model_path: str = "
|
| 12 |
"""
|
| 13 |
初始化句子提取器,加载评估关键词库和评分模型
|
| 14 |
:param eval_keywords_path: 评估关键词库(JSON)文件路径
|
|
@@ -243,7 +243,7 @@ class SentenceExtractor:
|
|
| 243 |
if __name__ == "__main__":
|
| 244 |
extractor = SentenceExtractor(
|
| 245 |
eval_keywords_path="evaluation_keywords2.json",
|
| 246 |
-
model_path="
|
| 247 |
)
|
| 248 |
|
| 249 |
sample_text = """
|
|
|
|
| 8 |
|
| 9 |
|
| 10 |
class SentenceExtractor:
|
| 11 |
+
def __init__(self, eval_keywords_path: str, model_path: str = "distilled_model.onnx"):
|
| 12 |
"""
|
| 13 |
初始化句子提取器,加载评估关键词库和评分模型
|
| 14 |
:param eval_keywords_path: 评估关键词库(JSON)文件路径
|
|
|
|
| 243 |
if __name__ == "__main__":
|
| 244 |
extractor = SentenceExtractor(
|
| 245 |
eval_keywords_path="evaluation_keywords2.json",
|
| 246 |
+
model_path="distilled_model.onnx"
|
| 247 |
)
|
| 248 |
|
| 249 |
sample_text = """
|