Spaces:
Sleeping
Sleeping
timeout
Browse files
app.py
CHANGED
|
@@ -116,7 +116,7 @@ def generate(
|
|
| 116 |
|
| 117 |
try:
|
| 118 |
# Make the request to the Llama.cpp server
|
| 119 |
-
with requests.post(f"{LLAMA_CPP_SERVER}/completion", json=payload, stream=True, timeout=
|
| 120 |
response.raise_for_status() # Raise HTTPError for bad responses (4xx or 5xx)
|
| 121 |
|
| 122 |
# Stream the response from the server
|
|
|
|
| 116 |
|
| 117 |
try:
|
| 118 |
# Make the request to the Llama.cpp server
|
| 119 |
+
with requests.post(f"{LLAMA_CPP_SERVER}/completion", json=payload, stream=True, timeout=(30, 300)) as response:
|
| 120 |
response.raise_for_status() # Raise HTTPError for bad responses (4xx or 5xx)
|
| 121 |
|
| 122 |
# Stream the response from the server
|