Sephfox commited on
Commit
36ff6a8
·
verified ·
1 Parent(s): f1d7262

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -283,7 +283,7 @@ def process_input(text):
283
 
284
  rf_prediction = rf_model.predict(encoded_text)[0]
285
  isolation_score = isolation_forest.decision_function(encoded_text)[0]
286
- nn_prediction = model(torch.LongTensor(encoded_text.todense()).to(device)).argmax(dim=1).item()
287
 
288
  predicted_emotion = emotion_classes[rf_prediction]
289
  sentiment_score = isolation_score
@@ -317,6 +317,4 @@ iface = gr.Interface(
317
  gr.Textbox(label="GPT Generated Text")
318
  ],
319
  live=True
320
- )
321
-
322
- iface.launch(share=True)
 
283
 
284
  rf_prediction = rf_model.predict(encoded_text)[0]
285
  isolation_score = isolation_forest.decision_function(encoded_text)[0]
286
+ nn_prediction = model(torch.LongTensor(encoded_text.toarray()).to(device)).argmax(dim=1).item()
287
 
288
  predicted_emotion = emotion_classes[rf_prediction]
289
  sentiment_score = isolation_score
 
317
  gr.Textbox(label="GPT Generated Text")
318
  ],
319
  live=True
320
+ )