dhruvsaxena11 commited on
Commit
ad3307b
1 Parent(s): 4d3b643

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -17,9 +17,9 @@ import tensorflow as tf # Apply softmax using tf.nn.softmax
17
 
18
  # Load the fine-tuned model from the saved directory
19
  # Load model directly
20
- from transformers import AutoTokenizer, AutoModelForSequenceClassification
21
 
22
- loaded_model = AutoModelForSequenceClassification.from_pretrained("dhruvsaxena11/emoton_model_dhruv")
23
  # loaded_model = TFBertForSequenceClassification.from_pretrained("https://huggingface.co/spaces/dhruvsaxena11/Emotion_Recognition_in_Text/blob/main/tf_model.h5")
24
  loaded_tokenizer=AutoTokenizer.from_pretrained("google-bert/bert-base-uncased")
25
 
 
17
 
18
  # Load the fine-tuned model from the saved directory
19
  # Load model directly
20
+ from transformers import AutoTokenizer, TFAutoModelForSequenceClassification
21
 
22
+ loaded_model = TFAutoModelForSequenceClassification.from_pretrained("dhruvsaxena11/emoton_model_dhruv")
23
  # loaded_model = TFBertForSequenceClassification.from_pretrained("https://huggingface.co/spaces/dhruvsaxena11/Emotion_Recognition_in_Text/blob/main/tf_model.h5")
24
  loaded_tokenizer=AutoTokenizer.from_pretrained("google-bert/bert-base-uncased")
25