Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,7 +14,7 @@ prompt = """你是 emoji 翻译大师。对于我和你说的所有话,你都
|
|
| 14 |
对于我和你说的任何话,都请用这样的方式回应。不要输出任何其它文字。
|
| 15 |
我的输入是————
|
| 16 |
"""
|
| 17 |
-
|
| 18 |
|
| 19 |
|
| 20 |
key = os.getenv("key")
|
|
@@ -27,7 +27,8 @@ url = "https://gpt.baixing.com/"
|
|
| 27 |
# 返回值:[type, content]
|
| 28 |
# 详见 https://huggingface.co/spaces/baixing/hackathon_test/blob/main/bot-api.md
|
| 29 |
def chat(p, qid, uid):
|
| 30 |
-
result = requests.get(url, params={"p": p, "k": key, "background": prompt}).json()['data']
|
|
|
|
| 31 |
return ["text", result]
|
| 32 |
|
| 33 |
iface = gr.Interface(fn=chat,
|
|
|
|
| 14 |
对于我和你说的任何话,都请用这样的方式回应。不要输出任何其它文字。
|
| 15 |
我的输入是————
|
| 16 |
"""
|
| 17 |
+
|
| 18 |
|
| 19 |
|
| 20 |
key = os.getenv("key")
|
|
|
|
| 27 |
# 返回值:[type, content]
|
| 28 |
# 详见 https://huggingface.co/spaces/baixing/hackathon_test/blob/main/bot-api.md
|
| 29 |
def chat(p, qid, uid):
|
| 30 |
+
# result = requests.get(url, params={"p": p, "k": key, "background": prompt}).json()['data']
|
| 31 |
+
result = requests.get(url, params={"p": p, "k": key}).json()['data']
|
| 32 |
return ["text", result]
|
| 33 |
|
| 34 |
iface = gr.Interface(fn=chat,
|