Spaces:
Running
Running
Update bin_public/utils/utils.py
Browse files
bin_public/utils/utils.py
CHANGED
@@ -320,14 +320,10 @@ def get_template_content(templates, selection, original_system_prompt):
|
|
320 |
return original_system_prompt
|
321 |
|
322 |
def get_pre_defined_q(selection):
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
q5 = '藿香正气口服液都适合什么时候服用'
|
328 |
-
q6 = '夏天到了,我吃火锅的时候,可以服用藿香正气口服液么'
|
329 |
-
q7 = '我吃火锅上火,喝藿香正气口服液有用么'
|
330 |
-
qs = [q1, q2, q3, q4, q5, q6, q7]
|
331 |
return qs[qs.index(selection)]
|
332 |
|
333 |
def reset_state():
|
|
|
320 |
return original_system_prompt
|
321 |
|
322 |
def get_pre_defined_q(selection):
|
323 |
+
with open(r'\questions.txt', 'r') as f:
|
324 |
+
qs = f.readlines()
|
325 |
+
for i in qs:
|
326 |
+
qs[qs.index(i)] = i.replace('\n', '')
|
|
|
|
|
|
|
|
|
327 |
return qs[qs.index(selection)]
|
328 |
|
329 |
def reset_state():
|