mahesh3394 commited on
Commit
ce69f2b
·
verified ·
1 Parent(s): de25959

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -27,7 +27,7 @@ def index():
27
  def predict():
28
 
29
  # try:
30
- print('before_hello',file=sys.stderr)
31
  input_text = request.get_json(force=True)['input']
32
  print(input_text,file=sys.stderr)
33
 
@@ -43,7 +43,7 @@ def predict():
43
  print(pipeline('hello'),file=sys.stderr)
44
  y_pred = pipeline(input_text)
45
 
46
- return jsonify({'prediction': y_pred[0]})
47
 
48
  # except Exception as e:
49
  # return jsonify({'error': str(e)})
 
27
  def predict():
28
 
29
  # try:
30
+
31
  input_text = request.get_json(force=True)['input']
32
  print(input_text,file=sys.stderr)
33
 
 
43
  print(pipeline('hello'),file=sys.stderr)
44
  y_pred = pipeline(input_text)
45
 
46
+ return y_pred[0]['label']
47
 
48
  # except Exception as e:
49
  # return jsonify({'error': str(e)})