Pravincoder commited on
Commit
2890eda
1 Parent(s): c044557

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -2,9 +2,10 @@ import gradio as gr
2
  import tensorflow as tf
3
  import numpy as np
4
  from tensorflow.keras.preprocessing.sequence import pad_sequences
 
5
 
6
  # Load the trained model
7
- model = tf.keras.models.load_model('./model_file.pkl')
8
 
9
  def spam_detection(message):
10
  # Preprocess the input message
 
2
  import tensorflow as tf
3
  import numpy as np
4
  from tensorflow.keras.preprocessing.sequence import pad_sequences
5
+ import pickle
6
 
7
  # Load the trained model
8
+ model = pickle.load(open('./model_file.pkl','rb')
9
 
10
  def spam_detection(message):
11
  # Preprocess the input message