Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -99,10 +99,10 @@ class DataEditor:
|
|
99 |
self.txturll = gr.Textbox(placeholder="link dir", interactive=True)
|
100 |
self.btn_displayy = gr.Button("Load Dataset",scale=1, size="sm")
|
101 |
|
102 |
-
def convert_to_dataframe(chunks):
|
103 |
df = pd.DataFrame({'Text': chunks, 'Flag': 0, 'Audio': None })
|
104 |
return df
|
105 |
-
def create_chunks_with_properties(text,sigmant_word):
|
106 |
words = text.split() # تقسيم النص إلى كلمات
|
107 |
chunks = []
|
108 |
current_chunk = []
|
@@ -115,7 +115,7 @@ class DataEditor:
|
|
115 |
if current_chunk: # إضافة الجزء الأخير إذا لم يكن فارغًا
|
116 |
chunks.append(" ".join(current_chunk))
|
117 |
|
118 |
-
chunks=convert_to_dataframe(chunks)
|
119 |
return chunks
|
120 |
def convert_dataframe_to_dataset(self, namedata):
|
121 |
datatable=self.finsh_data()
|
|
|
99 |
self.txturll = gr.Textbox(placeholder="link dir", interactive=True)
|
100 |
self.btn_displayy = gr.Button("Load Dataset",scale=1, size="sm")
|
101 |
|
102 |
+
def convert_to_dataframe(self,chunks):
|
103 |
df = pd.DataFrame({'Text': chunks, 'Flag': 0, 'Audio': None })
|
104 |
return df
|
105 |
+
def create_chunks_with_properties(self,text,sigmant_word):
|
106 |
words = text.split() # تقسيم النص إلى كلمات
|
107 |
chunks = []
|
108 |
current_chunk = []
|
|
|
115 |
if current_chunk: # إضافة الجزء الأخير إذا لم يكن فارغًا
|
116 |
chunks.append(" ".join(current_chunk))
|
117 |
|
118 |
+
chunks=self.convert_to_dataframe(chunks)
|
119 |
return chunks
|
120 |
def convert_dataframe_to_dataset(self, namedata):
|
121 |
datatable=self.finsh_data()
|