Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -46,9 +46,12 @@ def chat():
|
|
| 46 |
#async def chat(): #Failed - Flask API 不支持async???
|
| 47 |
data = request.get_json()
|
| 48 |
user_query = data['user_question']
|
|
|
|
| 49 |
if user_query !="" and not user_query.strip().isspace() and not user_query == "" and not user_query.strip() == "" and not user_query.isspace():
|
| 50 |
try:
|
| 51 |
loader = WebBaseLoader(user_query)
|
|
|
|
|
|
|
| 52 |
with st.spinner("AI Thinking...Please wait a while to Cheers!"):
|
| 53 |
docs = loader.load()
|
| 54 |
result=chain.run(docs)
|
|
|
|
| 46 |
#async def chat(): #Failed - Flask API 不支持async???
|
| 47 |
data = request.get_json()
|
| 48 |
user_query = data['user_question']
|
| 49 |
+
print(user_query)
|
| 50 |
if user_query !="" and not user_query.strip().isspace() and not user_query == "" and not user_query.strip() == "" and not user_query.isspace():
|
| 51 |
try:
|
| 52 |
loader = WebBaseLoader(user_query)
|
| 53 |
+
print(loader)
|
| 54 |
+
print(user_query)
|
| 55 |
with st.spinner("AI Thinking...Please wait a while to Cheers!"):
|
| 56 |
docs = loader.load()
|
| 57 |
result=chain.run(docs)
|