Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -104,19 +104,19 @@ def get_mfccs(audio, limit):
|
|
104 |
return mfccs
|
105 |
|
106 |
|
107 |
-
@st.
|
108 |
def get_title(predictions, categories=CAT6):
|
109 |
title = f"Detected emotion: {categories[predictions.argmax()]} \
|
110 |
- {predictions.max() * 100:.2f}%"
|
111 |
return title
|
112 |
|
113 |
|
114 |
-
@st.
|
115 |
def color_dict(coldict=COLOR_DICT):
|
116 |
return COLOR_DICT
|
117 |
|
118 |
|
119 |
-
@st.
|
120 |
def plot_polar(fig, predictions=TEST_PRED, categories=TEST_CAT,
|
121 |
title="TEST", colors=COLOR_DICT):
|
122 |
# color_sector = "grey"
|
|
|
104 |
return mfccs
|
105 |
|
106 |
|
107 |
+
@st.cache_data
|
108 |
def get_title(predictions, categories=CAT6):
|
109 |
title = f"Detected emotion: {categories[predictions.argmax()]} \
|
110 |
- {predictions.max() * 100:.2f}%"
|
111 |
return title
|
112 |
|
113 |
|
114 |
+
@st.cache_data
|
115 |
def color_dict(coldict=COLOR_DICT):
|
116 |
return COLOR_DICT
|
117 |
|
118 |
|
119 |
+
@st.cache_data
|
120 |
def plot_polar(fig, predictions=TEST_PRED, categories=TEST_CAT,
|
121 |
title="TEST", colors=COLOR_DICT):
|
122 |
# color_sector = "grey"
|