NV9523 commited on
Commit
15a41ac
·
verified ·
1 Parent(s): daea0ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -10
app.py CHANGED
@@ -2,18 +2,10 @@ import gradio as gr
2
  import numpy as np
3
  import librosa
4
  import tensorflow as tf
5
- from huggingface_hub import hf_hub_download
6
-
7
- # Repo chứa model
8
- REPO_ID = "NV9523/emotion_recognition"
9
-
10
- # Download model từ Hugging Face
11
- female_model_path = hf_hub_download(repo_id=REPO_ID, filename="emotion_recognition_female.h5")
12
- male_model_path = hf_hub_download(repo_id=REPO_ID, filename="emotion_recognition_male.h5")
13
 
14
  # Load trained models
15
- model_female = tf.keras.models.load_model(female_model_path)
16
- model_male = tf.keras.models.load_model(male_model_path)
17
 
18
  # Constants
19
  FRAME_LENGTH = 2048
 
2
  import numpy as np
3
  import librosa
4
  import tensorflow as tf
 
 
 
 
 
 
 
 
5
 
6
  # Load trained models
7
+ model_female = tf.keras.models.load_model("emotion_recognition_female.h5")
8
+ model_male = tf.keras.models.load_model("emotion_recognition_male.h5")
9
 
10
  # Constants
11
  FRAME_LENGTH = 2048