Spaces:
Runtime error
Runtime error
Commit
·
520155a
1
Parent(s):
efd6f1b
app.py
Browse files
app.py
CHANGED
@@ -1,19 +1,19 @@
|
|
1 |
-
import os
|
2 |
-
import shutil
|
3 |
import numpy as np
|
4 |
|
5 |
import tensorflow as tf
|
6 |
from tensorflow import keras
|
7 |
|
8 |
-
from pathlib import Path
|
9 |
-
from IPython.display import display, Audio
|
10 |
|
11 |
import numpy as np
|
12 |
import tensorflow as tf
|
13 |
import gradio as gr
|
14 |
from huggingface_hub import from_pretrained_keras
|
15 |
-
import cv2
|
16 |
-
from IPython.display import Audio
|
17 |
|
18 |
classes_names = ['Benjamin_Netanyau', 'Jens_Stoltenberg', 'Julia_Gillard', 'Magaret_Tarcher', 'Nelson_Mandela']
|
19 |
|
@@ -67,7 +67,7 @@ def audio_to_fft(audio):
|
|
67 |
return tf.math.abs(fft[:, : (audio.shape[1] // 2), :])
|
68 |
|
69 |
|
70 |
-
actual_audio_path = '/content/drive/MyDrive/Downloads/16000_pcm_speeches/audio/Benjamin_Netanyau/260.wav'
|
71 |
|
72 |
# print(path_to_audio(actual_audio_path).shape)
|
73 |
# print(actual_audio_path.shape)
|
|
|
1 |
+
#import os
|
2 |
+
#import shutil
|
3 |
import numpy as np
|
4 |
|
5 |
import tensorflow as tf
|
6 |
from tensorflow import keras
|
7 |
|
8 |
+
#from pathlib import Path
|
9 |
+
#from IPython.display import display, Audio
|
10 |
|
11 |
import numpy as np
|
12 |
import tensorflow as tf
|
13 |
import gradio as gr
|
14 |
from huggingface_hub import from_pretrained_keras
|
15 |
+
#import cv2
|
16 |
+
#from IPython.display import Audio
|
17 |
|
18 |
classes_names = ['Benjamin_Netanyau', 'Jens_Stoltenberg', 'Julia_Gillard', 'Magaret_Tarcher', 'Nelson_Mandela']
|
19 |
|
|
|
67 |
return tf.math.abs(fft[:, : (audio.shape[1] // 2), :])
|
68 |
|
69 |
|
70 |
+
#actual_audio_path = '/content/drive/MyDrive/Downloads/16000_pcm_speeches/audio/Benjamin_Netanyau/260.wav'
|
71 |
|
72 |
# print(path_to_audio(actual_audio_path).shape)
|
73 |
# print(actual_audio_path.shape)
|