Spaces:
Build error
Build error
removed unused functions
Browse files
app.py
CHANGED
@@ -5,8 +5,6 @@ import gradio as gr
|
|
5 |
import huggingface_hub
|
6 |
import scipy.io.wavfile as wavf
|
7 |
from huggingface_hub import Repository
|
8 |
-
from IPython.display import Audio
|
9 |
-
from IPython.core.display import display
|
10 |
|
11 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
12 |
|
@@ -70,7 +68,7 @@ def save_record(language,text,record):
|
|
70 |
|
71 |
def display_records():
|
72 |
df = pd.read_csv(DATA_FILE)
|
73 |
-
|
74 |
langs=df['language'].values
|
75 |
df['audio'] = df['audio'].apply(lambda x: x.replace('data/wav/','https://huggingface.co/datasets/chrisjay/crowd-speech-africa/resolve/main/wav/'))
|
76 |
audios = df['audio'].values
|
@@ -91,8 +89,7 @@ def display_records():
|
|
91 |
</tr>"""
|
92 |
html+="</table></div>"
|
93 |
return html
|
94 |
-
|
95 |
-
#return df
|
96 |
|
97 |
|
98 |
|
@@ -129,8 +126,5 @@ with block:
|
|
129 |
listen = gr.Button("Listen")
|
130 |
listen.click(display_records,inputs=[],outputs=gr.outputs.HTML() )
|
131 |
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
|
136 |
block.launch(enable_queue=True)
|
|
|
5 |
import huggingface_hub
|
6 |
import scipy.io.wavfile as wavf
|
7 |
from huggingface_hub import Repository
|
|
|
|
|
8 |
|
9 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
10 |
|
|
|
68 |
|
69 |
def display_records():
|
70 |
df = pd.read_csv(DATA_FILE)
|
71 |
+
|
72 |
langs=df['language'].values
|
73 |
df['audio'] = df['audio'].apply(lambda x: x.replace('data/wav/','https://huggingface.co/datasets/chrisjay/crowd-speech-africa/resolve/main/wav/'))
|
74 |
audios = df['audio'].values
|
|
|
89 |
</tr>"""
|
90 |
html+="</table></div>"
|
91 |
return html
|
92 |
+
|
|
|
93 |
|
94 |
|
95 |
|
|
|
126 |
listen = gr.Button("Listen")
|
127 |
listen.click(display_records,inputs=[],outputs=gr.outputs.HTML() )
|
128 |
|
|
|
|
|
|
|
129 |
|
130 |
block.launch(enable_queue=True)
|