update
Browse files
main.py
CHANGED
@@ -76,7 +76,7 @@ def main():
|
|
76 |
args = get_args()
|
77 |
|
78 |
description = """
|
79 |
-
##
|
80 |
"""
|
81 |
|
82 |
# example json
|
@@ -96,7 +96,7 @@ def main():
|
|
96 |
top_p: float = 0.85,
|
97 |
temperature: float = 0.35,
|
98 |
repetition_penalty: float = 1.2,
|
99 |
-
model_name: str = "qgyd2021/
|
100 |
is_chat: bool = True,
|
101 |
):
|
102 |
tokenizer = BertTokenizer.from_pretrained(model_name)
|
@@ -156,11 +156,9 @@ def main():
|
|
156 |
|
157 |
yield output
|
158 |
|
159 |
-
model_name_choices = ["trained_models/
|
160 |
if platform.system() == "Windows" else \
|
161 |
[
|
162 |
-
"qgyd2021/lip_service_4chan", "qgyd2021/chinese_chitchat",
|
163 |
-
"qgyd2021/chinese_porn_novel", "qgyd2021/few_shot_intent",
|
164 |
"qgyd2021/similar_question_generation"
|
165 |
]
|
166 |
|
@@ -179,7 +177,7 @@ def main():
|
|
179 |
examples=examples,
|
180 |
cache_examples=False,
|
181 |
examples_per_page=50,
|
182 |
-
title="
|
183 |
description=description,
|
184 |
)
|
185 |
demo.queue().launch()
|
|
|
76 |
args = get_args()
|
77 |
|
78 |
description = """
|
79 |
+
## Generate Similar Question
|
80 |
"""
|
81 |
|
82 |
# example json
|
|
|
96 |
top_p: float = 0.85,
|
97 |
temperature: float = 0.35,
|
98 |
repetition_penalty: float = 1.2,
|
99 |
+
model_name: str = "qgyd2021/similar_question_generation",
|
100 |
is_chat: bool = True,
|
101 |
):
|
102 |
tokenizer = BertTokenizer.from_pretrained(model_name)
|
|
|
156 |
|
157 |
yield output
|
158 |
|
159 |
+
model_name_choices = ["trained_models/similar_question_generation",] \
|
160 |
if platform.system() == "Windows" else \
|
161 |
[
|
|
|
|
|
162 |
"qgyd2021/similar_question_generation"
|
163 |
]
|
164 |
|
|
|
177 |
examples=examples,
|
178 |
cache_examples=False,
|
179 |
examples_per_page=50,
|
180 |
+
title="Generate Similar Question",
|
181 |
description=description,
|
182 |
)
|
183 |
demo.queue().launch()
|