janasumit2911 commited on
Commit
1204692
·
verified ·
1 Parent(s): ca7dff7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -46,7 +46,7 @@ def predict_text(params):
46
  logits = pred.logits
47
  pred_label = tf.argmax(logits, axis=1).numpy()[0]
48
 
49
- label = {1:'positive', 0:'negative'}
50
  result = {'text':text, 'label':label[pred_label]}
51
  solutions.append(result)
52
 
 
46
  logits = pred.logits
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