Spaces:
Sleeping
Sleeping
Add application file2
Browse files- Dockerfile +1 -1
- main.py +3 -4
Dockerfile
CHANGED
|
@@ -8,4 +8,4 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
| 8 |
|
| 9 |
COPY . .
|
| 10 |
|
| 11 |
-
CMD ["uvicorn", "
|
|
|
|
| 8 |
|
| 9 |
COPY . .
|
| 10 |
|
| 11 |
+
CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "7860"]
|
main.py
CHANGED
|
@@ -1,8 +1,7 @@
|
|
| 1 |
-
from fastapi import
|
| 2 |
|
| 3 |
-
app=
|
| 4 |
|
| 5 |
@app.get("/hello")
|
| 6 |
def hello():
|
| 7 |
-
|
| 8 |
-
return {"hello":"you success deploy"}
|
|
|
|
| 1 |
+
from fastapi import FastAPI
|
| 2 |
|
| 3 |
+
app = FastAPI()
|
| 4 |
|
| 5 |
@app.get("/hello")
|
| 6 |
def hello():
|
| 7 |
+
return {"hello": "you successfully deployed your FastAPI app"}
|
|
|