He Bo
commited on
Commit
•
6f0bd52
1
Parent(s):
8119e89
update
Browse files
app.py
CHANGED
@@ -66,7 +66,7 @@ def get_answer(question,session_id,language,prompt,search_engine,index,top_k,sco
|
|
66 |
|
67 |
question=question.replace('AWS','亚马逊云科技').replace('aws','亚马逊云科技').replace('Aws','亚马逊云科技')
|
68 |
print('question:',question)
|
69 |
-
|
70 |
if len(question) > 0:
|
71 |
url = api + question
|
72 |
else:
|
@@ -88,6 +88,7 @@ def get_answer(question,session_id,language,prompt,search_engine,index,top_k,sco
|
|
88 |
url += '&language=chinese'
|
89 |
url += ('&embedding_endpoint_name=huggingface-inference-text2vec-base-chinese-v1')
|
90 |
url += ('&llm_embedding_name=pytorch-inference-chatglm2-g5-4x')
|
|
|
91 |
|
92 |
elif language == "chinese-tc":
|
93 |
url += '&language=chinese-tc'
|
|
|
66 |
|
67 |
question=question.replace('AWS','亚马逊云科技').replace('aws','亚马逊云科技').replace('Aws','亚马逊云科技')
|
68 |
print('question:',question)
|
69 |
+
|
70 |
if len(question) > 0:
|
71 |
url = api + question
|
72 |
else:
|
|
|
88 |
url += '&language=chinese'
|
89 |
url += ('&embedding_endpoint_name=huggingface-inference-text2vec-base-chinese-v1')
|
90 |
url += ('&llm_embedding_name=pytorch-inference-chatglm2-g5-4x')
|
91 |
+
url += ('&prompt='+chinese_prompt)
|
92 |
|
93 |
elif language == "chinese-tc":
|
94 |
url += '&language=chinese-tc'
|