dilkushsingh commited on
Commit
1d12140
1 Parent(s): 5147bd7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -7,13 +7,13 @@ import cv2
7
  from tensorflow.keras.preprocessing import image
8
 
9
  # Pipelining the model
10
- from transformers import AutoImageProcessor, AutoModelForImageClassification
11
 
12
- processor = AutoImageProcessor.from_pretrained("microsoft/resnet-50")
13
- model = AutoModelForImageClassification.from_pretrained("microsoft/resnet-50")
14
 
15
  # Loading pre-trained model
16
- # model = tf.keras.models.load_model('Final_Resnet50_Best_model.keras')
17
 
18
  # Emotion labels dictionary
19
  emotion_labels = {'angry': 0, 'disgust': 1, 'fear': 2, 'happy': 3, 'neutral': 4, 'sad': 5, 'surprise': 6}
 
7
  from tensorflow.keras.preprocessing import image
8
 
9
  # Pipelining the model
10
+ #from transformers import AutoImageProcessor, AutoModelForImageClassification
11
 
12
+ #processor = AutoImageProcessor.from_pretrained("microsoft/resnet-50")
13
+ #model = AutoModelForImageClassification.from_pretrained("microsoft/resnet-50")
14
 
15
  # Loading pre-trained model
16
+ model = tf.keras.models.load_model('ResNet50_Transfer_Learning.keras')
17
 
18
  # Emotion labels dictionary
19
  emotion_labels = {'angry': 0, 'disgust': 1, 'fear': 2, 'happy': 3, 'neutral': 4, 'sad': 5, 'surprise': 6}