lyangas commited on
Commit
afc3da6
1 Parent(s): d5e3dc4

text key -> textB64

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -46,9 +46,10 @@ def test():
46
  @app.route("/predict", methods=['POST'])
47
  def read_root():
48
  data = request.json
49
- base64_bytes = str(data['text']).encode("ascii")
50
  sample_string_bytes = base64.b64decode(base64_bytes)
51
  text = sample_string_bytes.decode("ascii")
 
52
  # text = str(data['text'])
53
  top_n = int(data['top_n'])
54
 
 
46
  @app.route("/predict", methods=['POST'])
47
  def read_root():
48
  data = request.json
49
+ base64_bytes = str(data['textB64']).encode("ascii")
50
  sample_string_bytes = base64.b64decode(base64_bytes)
51
  text = sample_string_bytes.decode("ascii")
52
+ print(text)
53
  # text = str(data['text'])
54
  top_n = int(data['top_n'])
55