Spaces:
Runtime error
Runtime error
Commit
·
e865af2
1
Parent(s):
a597aed
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,8 +2,8 @@ import requests
|
|
| 2 |
import streamlit as st
|
| 3 |
|
| 4 |
def call_chatbot_api(query):
|
| 5 |
-
url = 'https://hf-aichat-api.onrender.com/api/chat' #OKed
|
| 6 |
-
|
| 7 |
# url = 'https://newaichatapi.onrender.com/api/chat' #Failed: JSONDecodeError: Expecting value: line 1 column 1 (char 0)
|
| 8 |
#data = {'query': query}
|
| 9 |
#在API设置中,将#user_query = data['query']中的query修改为user_question,因此在此处的API调用代码中,需要相应的使用data = {'user_question': query}
|
|
|
|
| 2 |
import streamlit as st
|
| 3 |
|
| 4 |
def call_chatbot_api(query):
|
| 5 |
+
# url = 'https://hf-aichat-api.onrender.com/api/chat' #OKed
|
| 6 |
+
url = 'https://hf-aichatboapi.onrender.com/api/chat' #Failed
|
| 7 |
# url = 'https://newaichatapi.onrender.com/api/chat' #Failed: JSONDecodeError: Expecting value: line 1 column 1 (char 0)
|
| 8 |
#data = {'query': query}
|
| 9 |
#在API设置中,将#user_query = data['query']中的query修改为user_question,因此在此处的API调用代码中,需要相应的使用data = {'user_question': query}
|