Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,7 +23,7 @@ subprocess.Popen(command)
|
|
| 23 |
print("Model server starting...")
|
| 24 |
|
| 25 |
# Esperar a que el servidor esté activo
|
| 26 |
-
while not is_server_active("
|
| 27 |
print("Waiting for server to start...")
|
| 28 |
time.sleep(5)
|
| 29 |
print("Model server is ready!")
|
|
@@ -34,7 +34,7 @@ def response(message, history):
|
|
| 34 |
response_text = ""
|
| 35 |
|
| 36 |
try:
|
| 37 |
-
stream_response = requests.post(url, json=body, stream=True, timeout=
|
| 38 |
for text_chunk in stream_response.iter_content(chunk_size=None):
|
| 39 |
text = text_chunk.decode('utf-8')
|
| 40 |
|
|
|
|
| 23 |
print("Model server starting...")
|
| 24 |
|
| 25 |
# Esperar a que el servidor esté activo
|
| 26 |
+
while not is_server_active("0.0.0.0", 2600):
|
| 27 |
print("Waiting for server to start...")
|
| 28 |
time.sleep(5)
|
| 29 |
print("Model server is ready!")
|
|
|
|
| 34 |
response_text = ""
|
| 35 |
|
| 36 |
try:
|
| 37 |
+
stream_response = requests.post(url, json=body, stream=True, timeout=20)
|
| 38 |
for text_chunk in stream_response.iter_content(chunk_size=None):
|
| 39 |
text = text_chunk.decode('utf-8')
|
| 40 |
|