Update app.py
Browse files
app.py
CHANGED
|
@@ -201,22 +201,29 @@ def build_interface():
|
|
| 201 |
# with gr.Tab("Content Management"):
|
| 202 |
gr.Markdown("## Video Localization")
|
| 203 |
with gr.Row():
|
| 204 |
-
with gr.Column():
|
| 205 |
file_input = gr.File(label="Upload Video/Audio File")
|
| 206 |
# platform_input = gr.Dropdown(["YouTube", "Instagram"], label="Select Platform")
|
| 207 |
language_input = gr.Dropdown(["en", "es", "fr", "zh"], label="Select Language") # Language codes
|
| 208 |
submit_button = gr.Button("Post and Process")
|
| 209 |
|
| 210 |
-
with gr.Column():
|
| 211 |
# post_output = gr.Textbox(label="Posting Status", interactive=False)
|
| 212 |
translated_output = gr.JSON(label="Video transcript")
|
| 213 |
processed_video_output = gr.File(label="Download Processed Video", interactive=False) # Download button
|
| 214 |
-
|
| 215 |
-
|
| 216 |
-
|
| 217 |
-
|
| 218 |
-
|
| 219 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 220 |
submit_button.click(
|
| 221 |
upload_and_manage,
|
| 222 |
inputs=[file_input, language_input],
|
|
@@ -226,7 +233,7 @@ def build_interface():
|
|
| 226 |
feedback_btn.click(
|
| 227 |
save_feedback_db,
|
| 228 |
inputs=[feedback_input],
|
| 229 |
-
outputs=[
|
| 230 |
)
|
| 231 |
|
| 232 |
# with gr.Tab("Analytics Dashboard"):
|
|
|
|
| 201 |
# with gr.Tab("Content Management"):
|
| 202 |
gr.Markdown("## Video Localization")
|
| 203 |
with gr.Row():
|
| 204 |
+
with gr.Column(scale=5):
|
| 205 |
file_input = gr.File(label="Upload Video/Audio File")
|
| 206 |
# platform_input = gr.Dropdown(["YouTube", "Instagram"], label="Select Platform")
|
| 207 |
language_input = gr.Dropdown(["en", "es", "fr", "zh"], label="Select Language") # Language codes
|
| 208 |
submit_button = gr.Button("Post and Process")
|
| 209 |
|
| 210 |
+
with gr.Column(scale=5):
|
| 211 |
# post_output = gr.Textbox(label="Posting Status", interactive=False)
|
| 212 |
translated_output = gr.JSON(label="Video transcript")
|
| 213 |
processed_video_output = gr.File(label="Download Processed Video", interactive=False) # Download button
|
| 214 |
+
|
| 215 |
+
with gr.Column(scale=1):
|
| 216 |
+
with gr.Box():
|
| 217 |
+
gr.Markdown("**Feedback**")
|
| 218 |
+
feedback_input = gr.Textbox(
|
| 219 |
+
placeholder="Leave your feedback here...",
|
| 220 |
+
label=None,
|
| 221 |
+
lines=3,
|
| 222 |
+
)
|
| 223 |
+
feedback_btn = gr.Button("Submit Feeback")
|
| 224 |
+
response_message = gr.Textbox(label=None, lines=1, interactive=False)
|
| 225 |
+
|
| 226 |
+
|
| 227 |
submit_button.click(
|
| 228 |
upload_and_manage,
|
| 229 |
inputs=[file_input, language_input],
|
|
|
|
| 233 |
feedback_btn.click(
|
| 234 |
save_feedback_db,
|
| 235 |
inputs=[feedback_input],
|
| 236 |
+
outputs=[response_message]
|
| 237 |
)
|
| 238 |
|
| 239 |
# with gr.Tab("Analytics Dashboard"):
|