tosanoob commited on
Commit
99692e4
1 Parent(s): 947b25c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -17
app.py CHANGED
@@ -1,17 +1,7 @@
1
- # app.py
2
- from flask import Flask, request, jsonify
3
-
4
- app = Flask(__name__)
5
-
6
- @app.route('/')
7
- def home():
8
- return "Welcome to the Python API!"
9
-
10
- @app.route('/predict', methods=['POST'])
11
- def predict():
12
- data = request.json
13
- # Here you would include your model prediction logic
14
- return jsonify({"prediction": "some result"})
15
-
16
- if __name__ == '__main__':
17
- app.run(host='0.0.0.0', port=8000)
 
1
+ from fastapi import FastAPI
2
+
3
+ app = FastAPI()
4
+
5
+ @app.get("/")
6
+ def read_root():
7
+ return {"Hello": "World!"}