Grokgpt commited on
Commit
4a020cd
1 Parent(s): 1c02e18

Refactored almost everything

Browse files
Files changed (4) hide show
  1. Dockerfile +1 -1
  2. app.py +0 -2
  3. main.py +7 -0
  4. 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:main", "--host", "0.0.0.0", "--port", "7860"]
 
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