Update app.py
Browse files
app.py
CHANGED
@@ -253,7 +253,12 @@ def build_interface():
|
|
253 |
# platform_input = gr.Dropdown(["YouTube", "Instagram"], label="Select Platform")
|
254 |
language_input = gr.Dropdown(["en", "es", "fr", "zh"], label="Select Language") # Language codes
|
255 |
submit_button = gr.Button("Post and Process")
|
256 |
-
|
|
|
|
|
|
|
|
|
|
|
257 |
with gr.Column(scale=5):
|
258 |
|
259 |
gr.Markdown("## Edit Translations")
|
@@ -266,7 +271,7 @@ def build_interface():
|
|
266 |
],
|
267 |
headers=["start", "original", "translated", "end"],
|
268 |
datatype=["number", "str", "str", "number"],
|
269 |
-
row_count=len(
|
270 |
col_count=4,
|
271 |
interactive=[False, True, True, False], # Control editability
|
272 |
label="Edit Translations",
|
@@ -298,11 +303,7 @@ def build_interface():
|
|
298 |
outputs=[processed_video_output]
|
299 |
)
|
300 |
|
301 |
-
|
302 |
-
upload_and_manage,
|
303 |
-
inputs=[file_input, language_input],
|
304 |
-
outputs=[editable_translations, processed_video_output]
|
305 |
-
)
|
306 |
# Connect submit button to save_feedback_db function
|
307 |
feedback_btn.click(
|
308 |
feedback_submission,
|
|
|
253 |
# platform_input = gr.Dropdown(["YouTube", "Instagram"], label="Select Platform")
|
254 |
language_input = gr.Dropdown(["en", "es", "fr", "zh"], label="Select Language") # Language codes
|
255 |
submit_button = gr.Button("Post and Process")
|
256 |
+
|
257 |
+
submit_button.click(
|
258 |
+
upload_and_manage,
|
259 |
+
inputs=[file_input, language_input],
|
260 |
+
outputs=[editable_translations, processed_video_output]
|
261 |
+
)
|
262 |
with gr.Column(scale=5):
|
263 |
|
264 |
gr.Markdown("## Edit Translations")
|
|
|
271 |
],
|
272 |
headers=["start", "original", "translated", "end"],
|
273 |
datatype=["number", "str", "str", "number"],
|
274 |
+
row_count=len(editable_translations),
|
275 |
col_count=4,
|
276 |
interactive=[False, True, True, False], # Control editability
|
277 |
label="Edit Translations",
|
|
|
303 |
outputs=[processed_video_output]
|
304 |
)
|
305 |
|
306 |
+
|
|
|
|
|
|
|
|
|
307 |
# Connect submit button to save_feedback_db function
|
308 |
feedback_btn.click(
|
309 |
feedback_submission,
|