i0xs0 commited on
Commit
bfd475a
·
verified ·
1 Parent(s): 659b553

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,12 +1,12 @@
1
  import gradio as gr
2
  import numpy as np
3
- import tensorflow as tf
4
  import pickle
5
- from tensorflow.keras.preprocessing.sequence import pad_sequences
 
6
 
7
  # Load model from Hugging Face Hub
8
  model_path = hf_hub_download(repo_id="i0xs0/Sentiment_Analysis_DeepLr", filename="AC-BiLSTM_Model.h5")
9
- model = tf.keras.models.load_model(model_path)
10
 
11
  # Load tokenizer from Hugging Face Hub
12
  tokenizer_path = hf_hub_download(repo_id="i0xs0/Sentiment_Analysis_DeepLr", filename="tokenizer_AC-BiLSTM.pkl")
 
1
  import gradio as gr
2
  import numpy as np
 
3
  import pickle
4
+ from keras.preprocessing.sequence import pad_sequences
5
+ import keras
6
 
7
  # Load model from Hugging Face Hub
8
  model_path = hf_hub_download(repo_id="i0xs0/Sentiment_Analysis_DeepLr", filename="AC-BiLSTM_Model.h5")
9
+ model = keras.models.load_model(model_path)
10
 
11
  # Load tokenizer from Hugging Face Hub
12
  tokenizer_path = hf_hub_download(repo_id="i0xs0/Sentiment_Analysis_DeepLr", filename="tokenizer_AC-BiLSTM.pkl")