Erfan11 commited on
Commit
fe512b7
1 Parent(s): 5f4a592

Update server.py

Browse files
Files changed (1) hide show
  1. server.py +3 -17
server.py CHANGED
@@ -1,18 +1,4 @@
1
- from flask import Flask, request, jsonify
2
 
3
- app = Flask(__name__)
4
-
5
- @app.route('/')
6
- def index():
7
- return "Welcome to the AI application!"
8
-
9
- @app.route('/predict', methods=['POST'])
10
- def predict():
11
- data = request.json
12
- text = data.get('text')
13
- # Example prediction logic
14
- result = "example result" # Replace with actual model prediction logic
15
- return jsonify({'prediction': result})
16
-
17
- if __name__ == "__main__":
18
- app.run(debug=True)
 
1
+ from app import app
2
 
3
+ if __name__ == '__main__':
4
+ app.run(host='0.0.0.0', port=5000)