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

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +17 -0
app.py ADDED
@@ -0,0 +1,17 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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)