Spaces:
Sleeping
Sleeping
Commit
·
dfb69d5
1
Parent(s):
83d9fde
DB storage debug 2
Browse files- Functions/caption_editor_functions.py +0 -2
- app.py +1 -1
Functions/caption_editor_functions.py
CHANGED
|
@@ -4,9 +4,7 @@ from Functions.db_connection import default_app
|
|
| 4 |
|
| 5 |
def get_captions_by_video_id(video_id):
|
| 6 |
response = default_app.database().child("Captions").child(video_id).get().val()
|
| 7 |
-
print(response)
|
| 8 |
captions = pd.DataFrame(response)
|
| 9 |
-
print(captions)
|
| 10 |
captions_edit = captions[['start_time', 'text', 'end_time']]
|
| 11 |
captions_edit.columns = ["Start", "Text", "End"]
|
| 12 |
return captions_edit, captions
|
|
|
|
| 4 |
|
| 5 |
def get_captions_by_video_id(video_id):
|
| 6 |
response = default_app.database().child("Captions").child(video_id).get().val()
|
|
|
|
| 7 |
captions = pd.DataFrame(response)
|
|
|
|
| 8 |
captions_edit = captions[['start_time', 'text', 'end_time']]
|
| 9 |
captions_edit.columns = ["Start", "Text", "End"]
|
| 10 |
return captions_edit, captions
|
app.py
CHANGED
|
@@ -65,7 +65,7 @@ with gr.Blocks(css=css) as main_page:
|
|
| 65 |
next_video_button = gr.Button("Next")
|
| 66 |
|
| 67 |
next_video_button.click(fn=get_next_components,
|
| 68 |
-
outputs=[video_embed,
|
| 69 |
save_button.click(fn=save,
|
| 70 |
inputs=[caption_editor, current_captions_full, current_video_id],
|
| 71 |
outputs=save_result)
|
|
|
|
| 65 |
next_video_button = gr.Button("Next")
|
| 66 |
|
| 67 |
next_video_button.click(fn=get_next_components,
|
| 68 |
+
outputs=[video_embed, current_video_id, caption_editor, current_captions_full])
|
| 69 |
save_button.click(fn=save,
|
| 70 |
inputs=[caption_editor, current_captions_full, current_video_id],
|
| 71 |
outputs=save_result)
|