Update app.py
Browse files
app.py
CHANGED
|
@@ -60,8 +60,13 @@ model.add(Dense(numLabels, activation='softmax'))
|
|
| 60 |
model.compile(loss='binary_crossentropy', optimizer='adam',
|
| 61 |
metrics=['accuracy'])
|
| 62 |
|
| 63 |
-
|
| 64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 65 |
def selected_audio(audio):
|
| 66 |
try:
|
| 67 |
if audio and audio != 'Please select any of the following options':
|
|
|
|
| 60 |
model.compile(loss='binary_crossentropy', optimizer='adam',
|
| 61 |
metrics=['accuracy'])
|
| 62 |
|
| 63 |
+
file_path = 'speech_emotion_detection_ravdess_savee.h5'
|
| 64 |
+
print(os.path.isfile(file_path))
|
| 65 |
+
try:
|
| 66 |
+
model.load_weights('speech_emotion_detection_ravdess_savee.h5')
|
| 67 |
+
except Exception as e:
|
| 68 |
+
print("Error: ", e)
|
| 69 |
+
|
| 70 |
def selected_audio(audio):
|
| 71 |
try:
|
| 72 |
if audio and audio != 'Please select any of the following options':
|