Spaces:
Build error
Build error
Update app.py
Browse files
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:'
|
| 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 |
|