deepsync commited on
Commit
e6db824
·
verified ·
1 Parent(s): f8b9a81

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -13
app.py CHANGED
@@ -103,32 +103,32 @@ with gr.Blocks() as demo:
103
  with gr.Row():
104
  video_html = gr.HTML(label="Video")
105
  video_playable = gr.Video(label="Video")
106
- gr.Markdown("Please ensure to fill these sections and do not leave them empty. An example of how to update `Video Type`, `Video Subject` and `Video Topics`:")
107
- gr.Markdown("If the video is of a Biology lecture, `Video Type`: `learning`, `Video Subject`: `science`, `Video Topics`: `biology`")
108
- gr.Markdown("If the video is of Cooking, `Video Type`: `cooking`, `Video Subject`: `cooking`, `Video Topics`: `indian recipe`")
109
  with gr.Row():
110
  video_type_dropdown = gr.Dropdown(["learning", "audiobook", "podcast", "vlog", "news", "cooking", "review"], label="Video Type", value="learning", allow_custom_value=True)
111
  video_subject_dropdown = gr.Dropdown(["tech", "science", "lifestyle", "cooking", "travel", "finance", "politics"], label="Video Subject", value="tech", allow_custom_value=True)
112
  video_topics_text = gr.Textbox(label="Video Topics")
113
  with gr.Row():
114
- video_tone_dropdown = gr.Dropdown(["casual", "semi-formal", "formal"], label="Video Tone", value="semi-formal")
115
- gender_dropdown = gr.Dropdown(["male", "female", "non-binary"], label="Gender", value="female")
116
- demography_text = gr.Textbox(label="Demography")
117
  with gr.Row():
118
- source_language_text = gr.Textbox(label="Source Language", interactive=False)
119
- target_language_text = gr.Textbox(label="Target Language", interactive=False)
120
  with gr.Row():
121
  total_time_text = gr.Textbox(label="Video Duration", interactive=False)
122
- comments_text = gr.Textbox(label="Comments")
123
  gr.Markdown("Video Line Information")
124
  line_id_dropdown = gr.Dropdown([], label="Line IDs")
125
  with gr.Row():
126
  audio_item = gr.Audio(label="Source Audio", type="filepath")
127
- accent_text = gr.Textbox(label="Accent", value="indian")
128
- speaker_gender_dropdown = gr.Dropdown(["female", "male"], label="Audio Gender", value="female")
129
  with gr.Row():
130
- source_transcript_text = gr.Textbox(label="Source Transcript")
131
- translation_text = gr.Textbox(label="Translation", interactive=False)
132
  update_button = gr.Button("Update")
133
 
134
  # Actions
 
103
  with gr.Row():
104
  video_html = gr.HTML(label="Video")
105
  video_playable = gr.Video(label="Video")
106
+ gr.Markdown("""Please ensure to fill these sections and do not leave them empty. An example of how to update `Video Type`, `Video Subject` and `Video Topics`:
107
+ - If the video is of a `Biology lecture`, **Video Type**: _learning_, **Video Subject**: _science_, **Video Topics**: _biology_
108
+ - If the video is of `Cooking`, **Video Type**: _cooking_, **Video Subject**: _cooking_, **Video Topics**: _indian recipe_""")
109
  with gr.Row():
110
  video_type_dropdown = gr.Dropdown(["learning", "audiobook", "podcast", "vlog", "news", "cooking", "review"], label="Video Type", value="learning", allow_custom_value=True)
111
  video_subject_dropdown = gr.Dropdown(["tech", "science", "lifestyle", "cooking", "travel", "finance", "politics"], label="Video Subject", value="tech", allow_custom_value=True)
112
  video_topics_text = gr.Textbox(label="Video Topics")
113
  with gr.Row():
114
+ video_tone_dropdown = gr.Dropdown(["casual", "semi-formal", "formal"], label="Video Tone", value="semi-formal", info="Tone used in the video.")
115
+ gender_dropdown = gr.Dropdown(["male", "female", "non-binary"], label="Gender", value="female", info="Gender used by the speaker in the video as whole.")
116
+ demography_text = gr.Textbox(label="Demography", info="Demography like normal, old, young, toddler, etc.")
117
  with gr.Row():
118
+ source_language_text = gr.Textbox(label="Source Language", interactive=False, visible=False)
119
+ target_language_text = gr.Textbox(label="Target Language", interactive=False, visible=False)
120
  with gr.Row():
121
  total_time_text = gr.Textbox(label="Video Duration", interactive=False)
122
+ comments_text = gr.Textbox(label="Comments", info="Any extra comments regarding the nature of video.")
123
  gr.Markdown("Video Line Information")
124
  line_id_dropdown = gr.Dropdown([], label="Line IDs")
125
  with gr.Row():
126
  audio_item = gr.Audio(label="Source Audio", type="filepath")
127
+ accent_text = gr.Textbox(label="Accent", value="indian", info="Accent of the person speaking. For example, indian, american, british.")
128
+ speaker_gender_dropdown = gr.Dropdown(["female", "male"], label="Audio Gender", value="female", info="Gender of the speaker")
129
  with gr.Row():
130
+ source_transcript_text = gr.Textbox(label="Source Transcript", info="Transcription of the above rendered audio. Please ensure correct punctuations based on the audio.")
131
+ translation_text = gr.Textbox(label="Translation", interactive=False, visible=False)
132
  update_button = gr.Button("Update")
133
 
134
  # Actions