Update app.py
Browse files
app.py
CHANGED
@@ -38,9 +38,8 @@ def load_lang(langname):
|
|
38 |
ds = corpora.ds_i
|
39 |
elif langname =="Faroese":
|
40 |
ds = corpora.ds_f
|
41 |
-
df = ds.data.to_pandas()
|
42 |
df = df.drop(columns=['audio', 'speaker_id','duration'])
|
43 |
-
return (df, df[:50])
|
44 |
|
45 |
|
46 |
def f1():
|
@@ -57,7 +56,7 @@ with bl:
|
|
57 |
lloadr = gr.Dropdown(["Faroese", "Icelandic"], label="Select language", info="Loading dataset can take several minutes")
|
58 |
|
59 |
with gr.Row():
|
60 |
-
invisidata = gr.DataFrame(interactive=False, visible=False)
|
61 |
databrowser = gr.DataFrame(wrap=True, max_rows=50, interactive=False, overflow_row_behaviour='paginate')
|
62 |
|
63 |
|
@@ -69,7 +68,7 @@ with bl:
|
|
69 |
btn1.click(f1, [], pl1)
|
70 |
|
71 |
|
72 |
-
lloadr.change(load_lang,lloadr,[
|
73 |
|
74 |
|
75 |
if __name__ == "__main__":
|
|
|
38 |
ds = corpora.ds_i
|
39 |
elif langname =="Faroese":
|
40 |
ds = corpora.ds_f
|
|
|
41 |
df = df.drop(columns=['audio', 'speaker_id','duration'])
|
42 |
+
return df[:25]#(df, df[:50])
|
43 |
|
44 |
|
45 |
def f1():
|
|
|
56 |
lloadr = gr.Dropdown(["Faroese", "Icelandic"], label="Select language", info="Loading dataset can take several minutes")
|
57 |
|
58 |
with gr.Row():
|
59 |
+
#invisidata = gr.DataFrame(interactive=False, visible=False)
|
60 |
databrowser = gr.DataFrame(wrap=True, max_rows=50, interactive=False, overflow_row_behaviour='paginate')
|
61 |
|
62 |
|
|
|
68 |
btn1.click(f1, [], pl1)
|
69 |
|
70 |
|
71 |
+
lloadr.change(load_lang,lloadr,[databrowser])
|
72 |
|
73 |
|
74 |
if __name__ == "__main__":
|