janasumit2911 commited on
Commit
c13ebef
·
verified ·
1 Parent(s): 6114db2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -47,11 +47,11 @@ def predict_text(params):
47
  pred_label = tf.argmax(logits, axis=1).numpy()[0]
48
 
49
  label = {0: 'BUSINESS', 1: 'COMEDY', 2: 'CRIME', 3: 'FOOD & DRINK', 4: 'POLITICS', 5: 'SPORTS', 6: 'TRAVEL'}
50
- result = {'text':text, 'label':label[pred_label]}
51
  solutions.append(result)
52
 
53
  result_url = f"{api}/{job_id}"
54
- # send_results_to_api(solutions, result_url)
55
  return json.dumps({"solutions":solutions}, indent=4)
56
 
57
 
 
47
  pred_label = tf.argmax(logits, axis=1).numpy()[0]
48
 
49
  label = {0: 'BUSINESS', 1: 'COMEDY', 2: 'CRIME', 3: 'FOOD & DRINK', 4: 'POLITICS', 5: 'SPORTS', 6: 'TRAVEL'}
50
+ result = {'text':text, 'label':[label[pred_label]]}
51
  solutions.append(result)
52
 
53
  result_url = f"{api}/{job_id}"
54
+ send_results_to_api(solutions, result_url)
55
  return json.dumps({"solutions":solutions}, indent=4)
56
 
57