grg commited on
Commit
ea2d6ae
1 Parent(s): b14be2c

Dummy Flask app

Browse files
Files changed (3) hide show
  1. Dockerfile +1 -1
  2. app.py +7 -6
  3. requirements.txt +1 -2
Dockerfile CHANGED
@@ -13,4 +13,4 @@ RUN pip install --no-cache-dir --upgrade -r requirements.txt
13
 
14
  COPY --chown=user . /app
15
 
16
- CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]
 
13
 
14
  COPY --chown=user . /app
15
 
16
+ CMD ["python", "-m", "app.py"]
app.py CHANGED
@@ -1,8 +1,9 @@
1
- from fastapi import FastAPI
 
2
 
3
- app = FastAPI()
4
-
5
- @app.get("/")
6
- def greet_json():
7
- return {"Hello": "World!"}
8
 
 
 
 
1
+ from flask import Flask
2
+ app = Flask(__name__)
3
 
4
+ @app.route('/')
5
+ def hello_world():
6
+ return 'Hello World!'
 
 
7
 
8
+ if __name__ == '__main__':
9
+ app.run(host='0.0.0.0', port=7860, debug=True)
requirements.txt CHANGED
@@ -1,3 +1,2 @@
1
- fastapi
2
- uvicorn[standard]
3
 
 
1
+ flask
 
2