Nash-pAnDiTa commited on
Commit
4165a1d
·
verified ·
1 Parent(s): ee1dc7d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -9
app.py CHANGED
@@ -19,6 +19,16 @@ def load_huggingface_dataset(dataset_link, token):
19
  # print(df)
20
  return df[["index", "transcription"]], dataset
21
 
 
 
 
 
 
 
 
 
 
 
22
  def update_transcriptions(df, dataset, token,dataset_link):
23
  """
24
  Update the transcriptions in the dataset and push it back to the Hugging Face Hub.
@@ -75,15 +85,6 @@ def main():
75
  original_df.loc[original_df["index"] == row["index"], "transcription"] = row["transcription"]
76
 
77
  return "update Successful"
78
-
79
- def delete_empty_rows(updated_df):
80
- """
81
- Delete rows marked for removal from the dataset.
82
- """
83
- # Remove rows where transcription is empty or manually marked
84
- updated_df = updated_df.dropna(subset=["transcription"])
85
- updated_df = updated_df[updated_df["transcription"].str.strip() != ""]
86
- return updated_df
87
 
88
  def submit_changes(df, token,dataset_link):
89
  """
 
19
  # print(df)
20
  return df[["index", "transcription"]], dataset
21
 
22
+
23
+ def delete_empty_rows(updated_df):
24
+ """
25
+ Delete rows marked for removal from the dataset.
26
+ """
27
+ # Remove rows where transcription is empty or manually marked
28
+ updated_df = updated_df.dropna(subset=["transcription"])
29
+ updated_df = updated_df[updated_df["transcription"].str.strip() != ""]
30
+ return updated_df
31
+
32
  def update_transcriptions(df, dataset, token,dataset_link):
33
  """
34
  Update the transcriptions in the dataset and push it back to the Hugging Face Hub.
 
85
  original_df.loc[original_df["index"] == row["index"], "transcription"] = row["transcription"]
86
 
87
  return "update Successful"
 
 
 
 
 
 
 
 
 
88
 
89
  def submit_changes(df, token,dataset_link):
90
  """