Spaces:
Sleeping
Sleeping
Upload 2 files
Browse files- start.sh +1 -1
- streamlit_app.py +1 -1
start.sh
CHANGED
@@ -33,7 +33,7 @@ echo "Ollama is ready."
|
|
33 |
echo "API is running on: http://0.0.0.0:7860"
|
34 |
|
35 |
# Start FastAPI in the background
|
36 |
-
uvicorn app:app --host 0.0.0.0 --port 8000 --workers
|
37 |
|
38 |
# Start Streamlit for UI
|
39 |
streamlit run streamlit_app.py --server.port 7860 --server.address 0.0.0.0
|
|
|
33 |
echo "API is running on: http://0.0.0.0:7860"
|
34 |
|
35 |
# Start FastAPI in the background
|
36 |
+
uvicorn app:app --host 0.0.0.0 --port 8000 --workers 1 --limit-concurrency 20 &
|
37 |
|
38 |
# Start Streamlit for UI
|
39 |
streamlit run streamlit_app.py --server.port 7860 --server.address 0.0.0.0
|
streamlit_app.py
CHANGED
@@ -14,7 +14,7 @@ def query_ai(question):
|
|
14 |
url = "http://127.0.0.1:8000/query/"
|
15 |
params = {"input_text": question}
|
16 |
|
17 |
-
with requests.get(url, params=params, stream=True) as response:
|
18 |
if response.status_code == 200:
|
19 |
full_response = ""
|
20 |
for chunk in response.iter_content(chunk_size=1024):
|
|
|
14 |
url = "http://127.0.0.1:8000/query/"
|
15 |
params = {"input_text": question}
|
16 |
|
17 |
+
with requests.get(url, params=params, stream=True,timeout=120) as response:
|
18 |
if response.status_code == 200:
|
19 |
full_response = ""
|
20 |
for chunk in response.iter_content(chunk_size=1024):
|