Update emotion_recognition_fine_tuning.py
Browse files
emotion_recognition_fine_tuning.py
CHANGED
@@ -17,7 +17,7 @@ import numpy as np
|
|
17 |
import tensorflow as tf # Apply softmax using tf.nn.softmax
|
18 |
|
19 |
# Load the fine-tuned model from the saved directory
|
20 |
-
loaded_model = TFBertForSequenceClassification.from_pretrained("
|
21 |
loaded_tokenizer=AutoTokenizer.from_pretrained("google-bert/bert-base-uncased")
|
22 |
|
23 |
def predict_emotion(text):
|
|
|
17 |
import tensorflow as tf # Apply softmax using tf.nn.softmax
|
18 |
|
19 |
# Load the fine-tuned model from the saved directory
|
20 |
+
loaded_model = TFBertForSequenceClassification.from_pretrained("https://huggingface.co/spaces/dhruvsaxena11/Emotion_Recognition_in_Text/blob/main/tf_model.h5")
|
21 |
loaded_tokenizer=AutoTokenizer.from_pretrained("google-bert/bert-base-uncased")
|
22 |
|
23 |
def predict_emotion(text):
|