sami606713 commited on
Commit
c07f07c
·
verified ·
1 Parent(s): 6dcf668

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -1
app.py CHANGED
@@ -2,8 +2,14 @@ import streamlit as st
2
  import soundfile as sf
3
  # Use a pipeline as a high-level helper
4
  from transformers import pipeline
 
5
 
6
- pipe = pipeline("audio-classification", model="sami606713/emotion_classification")
 
 
 
 
 
7
 
8
  # Title and description
9
  st.title("Audio Emotion Classification")
 
2
  import soundfile as sf
3
  # Use a pipeline as a high-level helper
4
  from transformers import pipeline
5
+ import shutil
6
 
7
+ # Clear the Hugging Face cache
8
+ shutil.rmtree("./transformers_cache", ignore_errors=True)
9
+ try:
10
+ classifier = pipeline("audio-classification", model="sami606713/emotion_classification")
11
+ except Exception as e:
12
+ st.write(f"{e}")
13
 
14
  # Title and description
15
  st.title("Audio Emotion Classification")