Spaces:
Runtime error
Runtime error
Commit
·
7965d4d
1
Parent(s):
59216d7
Update app.py
Browse files
app.py
CHANGED
|
@@ -22,6 +22,11 @@ model = get_mobilenet(width_mult=NAME_TO_WIDTH(MODEL_NAME), pretrained_name=MODE
|
|
| 22 |
model.to(device)
|
| 23 |
model.eval()
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
|
| 26 |
def audio_tag(
|
| 27 |
audio_path,
|
|
@@ -53,12 +58,6 @@ def audio_tag(
|
|
| 53 |
label = labels[sorted_indexes[0]]
|
| 54 |
return formatted_message(label)
|
| 55 |
|
| 56 |
-
|
| 57 |
-
cached_audio_class = None
|
| 58 |
-
template = None
|
| 59 |
-
prompt = None
|
| 60 |
-
chain = None
|
| 61 |
-
|
| 62 |
def formatted_message(audio_class):
|
| 63 |
if cached_audio_class != audio_class:
|
| 64 |
cached_audio_class = audio_class
|
|
|
|
| 22 |
model.to(device)
|
| 23 |
model.eval()
|
| 24 |
|
| 25 |
+
cached_audio_class = None
|
| 26 |
+
template = None
|
| 27 |
+
prompt = None
|
| 28 |
+
chain = None
|
| 29 |
+
|
| 30 |
|
| 31 |
def audio_tag(
|
| 32 |
audio_path,
|
|
|
|
| 58 |
label = labels[sorted_indexes[0]]
|
| 59 |
return formatted_message(label)
|
| 60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
def formatted_message(audio_class):
|
| 62 |
if cached_audio_class != audio_class:
|
| 63 |
cached_audio_class = audio_class
|