Spaces:
Sleeping
Sleeping
Ezhil
commited on
Commit
Β·
9e1e908
1
Parent(s):
720868d
Dockerfile
CHANGED
|
@@ -20,6 +20,6 @@ RUN pip install --no-cache-dir -r requirements.txt
|
|
| 20 |
COPY --chown=user . /app
|
| 21 |
|
| 22 |
# Run FastAPI and Streamlit in parallel
|
| 23 |
-
CMD ["uvicorn" ,"
|
| 24 |
|
| 25 |
|
|
|
|
| 20 |
COPY --chown=user . /app
|
| 21 |
|
| 22 |
# Run FastAPI and Streamlit in parallel
|
| 23 |
+
CMD ["uvicorn" ,"api.main:app","--host" ,"0.0.0.0", "--port", "7860"]
|
| 24 |
|
| 25 |
|
{data β api/data}/world_population.csv
RENAMED
|
File without changes
|
api/main.py
CHANGED
|
@@ -2,7 +2,7 @@ from fastapi import FastAPI
|
|
| 2 |
app = FastAPI()
|
| 3 |
import os
|
| 4 |
import sys
|
| 5 |
-
src_directory = os.path.abspath(os.path.join(os.path.dirname(__file__),"
|
| 6 |
sys.path.append(src_directory)
|
| 7 |
|
| 8 |
|
|
|
|
| 2 |
app = FastAPI()
|
| 3 |
import os
|
| 4 |
import sys
|
| 5 |
+
src_directory = os.path.abspath(os.path.join(os.path.dirname(__file__),"../","api"))
|
| 6 |
sys.path.append(src_directory)
|
| 7 |
|
| 8 |
|
{modules β api/modules}/__pycache__/continents.cpython-310.pyc
RENAMED
|
File without changes
|
{modules β api/modules}/continents.py
RENAMED
|
File without changes
|