Refactored almost everything
Browse files- Dockerfile +1 -1
- app.py +0 -2
- main.py +7 -0
- requirements.txt +2 -0
Dockerfile
CHANGED
@@ -8,4 +8,4 @@ RUN pip install --no-cache-dir --upgrade -r /code/requirements.txt
|
|
8 |
|
9 |
COPY . .
|
10 |
|
11 |
-
CMD ["uvicorn", "app:
|
|
|
8 |
|
9 |
COPY . .
|
10 |
|
11 |
+
CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"]
|
app.py
DELETED
@@ -1,2 +0,0 @@
|
|
1 |
-
def main():
|
2 |
-
print("Hello World!")
|
|
|
|
|
|
main.py
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from fastapi import FastAPI
|
2 |
+
|
3 |
+
app = FastAPI()
|
4 |
+
|
5 |
+
|
6 |
+
def read_root():
|
7 |
+
return {"Hello": "World!"}
|
requirements.txt
CHANGED
@@ -1 +1,3 @@
|
|
|
|
|
|
1 |
uvicorn
|
|
|
1 |
+
fastapi
|
2 |
+
requests
|
3 |
uvicorn
|