HarishMaths commited on
Commit
e10510b
·
verified ·
1 Parent(s): e85e884

Upload backend.py

Browse files
Files changed (1) hide show
  1. backend.py +14 -0
backend.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # app.py (Flask API)
2
+ from flask import Flask, request, jsonify
3
+
4
+ app = Flask(__name__)
5
+
6
+ @app.route('/predict', methods=['POST'])
7
+ def predict():
8
+ data = request.json
9
+ text = data.get("text", "")
10
+ result = {"prediction": text.upper()} # Dummy logic
11
+ return jsonify(result)
12
+
13
+ if __name__ == '__main__':
14
+ app.run(debug=True)