Spaces:
Sleeping
Sleeping
Commit
·
ae79c64
1
Parent(s):
7b4ca7a
adding files
Browse files- Dockerfile +1 -1
- app.py +7 -0
Dockerfile
CHANGED
|
@@ -17,4 +17,4 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
| 17 |
COPY . /code/
|
| 18 |
|
| 19 |
# Command to run on container start
|
| 20 |
-
CMD ["uvicorn", "
|
|
|
|
| 17 |
COPY . /code/
|
| 18 |
|
| 19 |
# Command to run on container start
|
| 20 |
+
CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "8123"]
|
app.py
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from fastapi import FastAPI
|
| 2 |
+
|
| 3 |
+
app = FastAPI()
|
| 4 |
+
|
| 5 |
+
@app.get("/hello")
|
| 6 |
+
def hello():
|
| 7 |
+
return {"hello":"success"}
|