Spaces:
Sleeping
Sleeping
Commit ·
0daf29e
1
Parent(s): 177f8b5
Increase frontend timeout to 300s for CPU inference
Browse filesCo-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
- frontend/app.py +2 -2
frontend/app.py
CHANGED
|
@@ -64,7 +64,7 @@ with col1:
|
|
| 64 |
if submit_button and query.strip():
|
| 65 |
with st.spinner("Searching and generating answer..."):
|
| 66 |
try:
|
| 67 |
-
# Make API request
|
| 68 |
response = httpx.post(
|
| 69 |
f"{BACKEND_URL}/query",
|
| 70 |
json={
|
|
@@ -72,7 +72,7 @@ if submit_button and query.strip():
|
|
| 72 |
"top_k": 5,
|
| 73 |
"language": selected_lang_code
|
| 74 |
},
|
| 75 |
-
timeout=
|
| 76 |
)
|
| 77 |
|
| 78 |
if response.status_code == 200:
|
|
|
|
| 64 |
if submit_button and query.strip():
|
| 65 |
with st.spinner("Searching and generating answer..."):
|
| 66 |
try:
|
| 67 |
+
# Make API request with extended timeout for CPU inference
|
| 68 |
response = httpx.post(
|
| 69 |
f"{BACKEND_URL}/query",
|
| 70 |
json={
|
|
|
|
| 72 |
"top_k": 5,
|
| 73 |
"language": selected_lang_code
|
| 74 |
},
|
| 75 |
+
timeout=httpx.Timeout(300.0, connect=30.0, read=300.0)
|
| 76 |
)
|
| 77 |
|
| 78 |
if response.status_code == 200:
|