Priyanhsu commited on
Commit
80fb6b9
·
1 Parent(s): e5c4825

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -50,15 +50,14 @@ def test_model(text):
50
  preprocessed_text = ' '.join(filtered_text)
51
 
52
  # Vectorize the preprocessed text
53
- vectorize_texts =vectorize_text([preprocessed_text])
54
 
55
  # Make prediction on the vectorized text
56
- prediction = model.predict(vectorize_texts)[0]
57
 
58
  # Return the prediction
59
  return prediction
60
 
61
  # Create the Gradio interface
62
  iface = gr.Interface(fn=test_model, inputs="text", outputs="text", title="Text Classification")
63
- iface.launch()
64
-
 
50
  preprocessed_text = ' '.join(filtered_text)
51
 
52
  # Vectorize the preprocessed text
53
+ vectorize_texts = vectorize_text([preprocessed_text])
54
 
55
  # Make prediction on the vectorized text
56
+ prediction = model.predict(vectorize_texts[0])[0]
57
 
58
  # Return the prediction
59
  return prediction
60
 
61
  # Create the Gradio interface
62
  iface = gr.Interface(fn=test_model, inputs="text", outputs="text", title="Text Classification")
63
+ iface.launch()