Petermoyano commited on
Commit
1da03ca
·
1 Parent(s): 4a5f5bf

Add test route

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -6,6 +6,16 @@ app = Flask(__name__)
6
  def hello_world():
7
  return 'Hello, World!'
8
 
 
 
 
 
 
 
 
 
 
 
9
  if __name__ == '__main__':
10
  from os import environ
11
  app.run(host='0.0.0.0', port=int(environ.get('PORT', 5000)))
 
6
  def hello_world():
7
  return 'Hello, World!'
8
 
9
+ @app.route('/run/predict', methods=['POST'])
10
+ def predict():
11
+ data = request.json
12
+ # Process the input data and generate a response
13
+ # For demonstration, we'll just echo the input data
14
+ response = {
15
+ "data": data
16
+ }
17
+ return jsonify(response)
18
+
19
  if __name__ == '__main__':
20
  from os import environ
21
  app.run(host='0.0.0.0', port=int(environ.get('PORT', 5000)))