Jayesh13 commited on
Commit
7b9f843
·
1 Parent(s): 91b1844

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -83,8 +83,8 @@ def clean_text( text):
83
 
84
  return ''.join(words)
85
 
86
- df = pd.read_csv('train.csv.zip')
87
- df['comment_text'] = df['comment_text'].apply(lambda x: clean_text(x))
88
 
89
  model = pickle.load(open('tox_model.h5','rb'))
90
 
@@ -93,7 +93,7 @@ input = st.text_area('Enter your comment')
93
 
94
  input = input.apply(lambda x: clean_text(x))
95
  tok = Tokenizer(num_words=1000, oov_token='UNK')
96
- tok.fit_on_texts(df['comment_text'] )
97
 
98
  x_test = tok.texts_to_sequence(input)
99
  input_text = pad_sequences(x_test,
 
83
 
84
  return ''.join(words)
85
 
86
+ #df = pd.read_csv('train.csv.zip')
87
+ #df['comment_text'] = df['comment_text'].apply(lambda x: clean_text(x))
88
 
89
  model = pickle.load(open('tox_model.h5','rb'))
90
 
 
93
 
94
  input = input.apply(lambda x: clean_text(x))
95
  tok = Tokenizer(num_words=1000, oov_token='UNK')
96
+ #tok.fit_on_texts(df['comment_text'] )
97
 
98
  x_test = tok.texts_to_sequence(input)
99
  input_text = pad_sequences(x_test,