Update app.py
Browse files
app.py
CHANGED
@@ -271,6 +271,7 @@ def build_interface():
|
|
271 |
|
272 |
# Editable JSON Data
|
273 |
editable_table = gr.Dataframe(
|
|
|
274 |
headers=["start", "original", "translated", "end"],
|
275 |
datatype=["number", "str", "str", "number"],
|
276 |
row_count=0, # Initially empty
|
@@ -308,7 +309,8 @@ def build_interface():
|
|
308 |
submit_button.click(
|
309 |
upload_and_manage,
|
310 |
inputs=[file_input, language_input],
|
311 |
-
outputs=[editable_translations, editable_table, processed_video_output]
|
|
|
312 |
)
|
313 |
|
314 |
# Connect submit button to save_feedback_db function
|
|
|
271 |
|
272 |
# Editable JSON Data
|
273 |
editable_table = gr.Dataframe(
|
274 |
+
value=[], # Default to an empty list to avoid undefined values
|
275 |
headers=["start", "original", "translated", "end"],
|
276 |
datatype=["number", "str", "str", "number"],
|
277 |
row_count=0, # Initially empty
|
|
|
309 |
submit_button.click(
|
310 |
upload_and_manage,
|
311 |
inputs=[file_input, language_input],
|
312 |
+
outputs=[editable_translations, editable_table, processed_video_output],
|
313 |
+
error=lambda e: print(f"Error: {e}") # Optional: Log the error for debugging
|
314 |
)
|
315 |
|
316 |
# Connect submit button to save_feedback_db function
|