curtpond commited on
Commit
9c3960f
1 Parent(s): 56ca6bd

Updated app.py.

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -6,9 +6,9 @@ import pickle5 as pickle
6
  # Load model from pickle file
7
  model = pickle.load(open('lg_classifier.sav', 'rb'))
8
 
9
- # Define function to predict
10
  def predict(text):
11
- return model.predict([text])
12
 
13
  # Define interface
14
  demo = gr.Interface(fn=predict,
 
6
  # Load model from pickle file
7
  model = pickle.load(open('lg_classifier.sav', 'rb'))
8
 
9
+ # Define function to predict label
10
  def predict(text):
11
+ return model.predict([[text]])[0]
12
 
13
  # Define interface
14
  demo = gr.Interface(fn=predict,