Spaces:
Sleeping
Sleeping
ASG Models
commited on
Commit
•
69624fd
1
Parent(s):
5c16c19
Update app.py
Browse files
app.py
CHANGED
@@ -164,6 +164,11 @@ class DataViewerApp:
|
|
164 |
self.data =self.df[['text','speaker_id','secs','flag']]
|
165 |
self.sdata =self.df['audio'].to_list()
|
166 |
return self.get_page_data(self.current_page)
|
|
|
|
|
|
|
|
|
|
|
167 |
def connect_drive(self):
|
168 |
from google.colab import drive
|
169 |
drive.mount('/content/drive')
|
@@ -442,6 +447,7 @@ class DataViewerApp:
|
|
442 |
self.txt_dataset=gr.Text("save dataset",interactive=True)
|
443 |
self.btn_convertDataset=gr.Button("Dir Output Bitch :",variant="primary")
|
444 |
self.label_dataset=gr.Label("count:")
|
|
|
445 |
self.btn_ClearEnglish.click(self.clearenglish,[],[self.data_table])
|
446 |
self.but_send_dir.click(self.getdataset, [self.txt_filepath_dir],[self.data_table,self.labell,self.txt_dataset])
|
447 |
#self.but_send_dateSet_cut.click(self.splitt, [self.txt_filepath_dateSet,self.num],[self.data_table,self.labell])
|
|
|
164 |
self.data =self.df[['text','speaker_id','secs','flag']]
|
165 |
self.sdata =self.df['audio'].to_list()
|
166 |
return self.get_page_data(self.current_page)
|
167 |
+
def order_data(self):
|
168 |
+
self.df[['text','speaker_id','secs','flag']]=self.data
|
169 |
+
self.df=self.df.sort_values(by=['flag'], ascending=False)
|
170 |
+
vv=self.settt(self.df)
|
171 |
+
return vv
|
172 |
def connect_drive(self):
|
173 |
from google.colab import drive
|
174 |
drive.mount('/content/drive')
|
|
|
447 |
self.txt_dataset=gr.Text("save dataset",interactive=True)
|
448 |
self.btn_convertDataset=gr.Button("Dir Output Bitch :",variant="primary")
|
449 |
self.label_dataset=gr.Label("count:")
|
450 |
+
self.order.click(self.order_data,[],[self.data_table])
|
451 |
self.btn_ClearEnglish.click(self.clearenglish,[],[self.data_table])
|
452 |
self.but_send_dir.click(self.getdataset, [self.txt_filepath_dir],[self.data_table,self.labell,self.txt_dataset])
|
453 |
#self.but_send_dateSet_cut.click(self.splitt, [self.txt_filepath_dateSet,self.num],[self.data_table,self.labell])
|