qqwjq1981 commited on
Commit
4278613
·
verified ·
1 Parent(s): 7d3e4d6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -179,12 +179,12 @@ def update_translations(file, edited_table):
179
  # Convert the edited_table (list of lists) back to list of dictionaries
180
  updated_translations = [
181
  {
182
- "start": row[0], # First column
183
- "original": row[1], # Second column
184
- "translated": row[2], # Third column
185
- "end": row[3], # Fourth column
186
  }
187
- for row in edited_table
188
  ]
189
 
190
  # Call the function to process the video with updated translations
 
179
  # Convert the edited_table (list of lists) back to list of dictionaries
180
  updated_translations = [
181
  {
182
+ "start": row["start"], # Access by column name
183
+ "original": row["original"],
184
+ "translated": row["translated"],
185
+ "end": row["end"]
186
  }
187
+ for _, row in edited_table.iterrows()
188
  ]
189
 
190
  # Call the function to process the video with updated translations