Update app.py
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def index():
|
|
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,7 +43,7 @@ def predict():
|
|
43 |
print(pipeline('hello'),file=sys.stderr)
|
44 |
y_pred = pipeline(input_text)
|
45 |
|
46 |
-
return
|
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)})
|