Spaces:
Running
Running
ASG Models
commited on
Commit
•
948e406
1
Parent(s):
ff11af3
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,8 @@ import os
|
|
7 |
import gradio as gr
|
8 |
import re
|
9 |
from gradio.themes.base import Base
|
10 |
-
|
|
|
11 |
|
12 |
|
13 |
def Read_DataSet(link):
|
@@ -23,7 +24,8 @@ def remove_nn(wav, sample_rate=16000):
|
|
23 |
save_audio("enhanced.wav", enhanced, df_state.sr())
|
24 |
audiodata, samplerate = librosa.load("enhanced.wav", sr=16000)
|
25 |
return 16000, audiodata
|
26 |
-
|
|
|
27 |
class DataViewerApp:
|
28 |
def __init__(self,df):
|
29 |
#df=Read_DataSet(link)
|
@@ -224,7 +226,7 @@ class DataViewerApp:
|
|
224 |
df =df.drop(columns=["__index_level_0__"])
|
225 |
train_df =df
|
226 |
|
227 |
-
|
228 |
|
229 |
ds = {
|
230 |
"train": Dataset.from_pandas(train_df)
|
@@ -232,9 +234,8 @@ class DataViewerApp:
|
|
232 |
}
|
233 |
|
234 |
dataset = DatasetDict(ds)
|
235 |
-
|
236 |
-
|
237 |
-
return dirr
|
238 |
|
239 |
def delete_row(self):
|
240 |
|
|
|
7 |
import gradio as gr
|
8 |
import re
|
9 |
from gradio.themes.base import Base
|
10 |
+
from datasets import load_dataset
|
11 |
+
from datasets import Dataset,DatasetDict
|
12 |
|
13 |
|
14 |
def Read_DataSet(link):
|
|
|
24 |
save_audio("enhanced.wav", enhanced, df_state.sr())
|
25 |
audiodata, samplerate = librosa.load("enhanced.wav", sr=16000)
|
26 |
return 16000, audiodata
|
27 |
+
|
28 |
+
|
29 |
class DataViewerApp:
|
30 |
def __init__(self,df):
|
31 |
#df=Read_DataSet(link)
|
|
|
226 |
df =df.drop(columns=["__index_level_0__"])
|
227 |
train_df =df
|
228 |
|
229 |
+
|
230 |
|
231 |
ds = {
|
232 |
"train": Dataset.from_pandas(train_df)
|
|
|
234 |
}
|
235 |
|
236 |
dataset = DatasetDict(ds)
|
237 |
+
dataset.push_to_hub(namedata,token=os.environ.get("auth_acess_data"))
|
238 |
+
return namedata
|
|
|
239 |
|
240 |
def delete_row(self):
|
241 |
|