gpcerv commited on
Commit
e4e47e1
1 Parent(s): 719d8e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -3
app.py CHANGED
@@ -44,6 +44,7 @@ def flask_app():
44
  '<h3><a href="https://www.ftintelligence.altervista.org/qa.php" target="_blank">Vai alla Question Answering Demo!</a></h3>'
45
 
46
  @app.route('/broadcast_labels',methods=['POST','GET'])
 
47
  def broadcast_labels():
48
  if request.method == 'GET':
49
  s=request.args.get('S')
@@ -53,6 +54,7 @@ def broadcast_labels():
53
  return response
54
 
55
  @app.route('/requestsQA',methods=['POST','GET'])
 
56
  def tasksQA():
57
  ris=''
58
  if request.method == 'POST':
@@ -62,6 +64,7 @@ def tasksQA():
62
  return ris
63
 
64
  @app.route('/requestsSearch',methods=['POST','GET'])
 
65
  def tasksSearch():
66
  response=''
67
  if request.method == 'POST':
@@ -73,6 +76,7 @@ def tasksSearch():
73
  return response
74
 
75
  @app.route('/predict', methods=['POST','GET'])
 
76
  def predict():
77
  dati=[]
78
  #context=request.args.get('testo')
@@ -89,6 +93,4 @@ def predict():
89
 
90
 
91
  if __name__ == "__main__":
92
- #app.run(host="0.0.0.0")
93
- #app.run(debug=False)
94
- app.run()
 
44
  '<h3><a href="https://www.ftintelligence.altervista.org/qa.php" target="_blank">Vai alla Question Answering Demo!</a></h3>'
45
 
46
  @app.route('/broadcast_labels',methods=['POST','GET'])
47
+ @support_jsonp
48
  def broadcast_labels():
49
  if request.method == 'GET':
50
  s=request.args.get('S')
 
54
  return response
55
 
56
  @app.route('/requestsQA',methods=['POST','GET'])
57
+ @support_jsonp
58
  def tasksQA():
59
  ris=''
60
  if request.method == 'POST':
 
64
  return ris
65
 
66
  @app.route('/requestsSearch',methods=['POST','GET'])
67
+ @support_jsonp
68
  def tasksSearch():
69
  response=''
70
  if request.method == 'POST':
 
76
  return response
77
 
78
  @app.route('/predict', methods=['POST','GET'])
79
+ @support_jsonp
80
  def predict():
81
  dati=[]
82
  #context=request.args.get('testo')
 
93
 
94
 
95
  if __name__ == "__main__":
96
+ app.run(host='0.0.0.0', port=7860)