Spaces:
Sleeping
Sleeping
rosyvs
commited on
Commit
·
c477ae4
1
Parent(s):
4ae2d87
Fix flagging_mode typo in Gradio interface components
Browse files
app.py
CHANGED
|
@@ -200,7 +200,7 @@ output_format = gr.Dropdown(choices=["mkv", "MOV", "mp4", "wav"], label="Select
|
|
| 200 |
start_time = gr.Textbox(label="Start time (in seconds or HH:MM:SS). Leave blank to start at beginning.")
|
| 201 |
end_time = gr.Textbox(label="End time (in seconds or HH:MM:SS). Leave blank to trim a 5-minute interval since start.")
|
| 202 |
output_file = gr.File(label="Download trimmed file")
|
| 203 |
-
interface = gr.Interface(fn=trim_video, inputs=[input_file, output_format, start_time, end_time], outputs=output_file, title="Video Trimmer",
|
| 204 |
description="Trim a video file to a specific time interval. Please wait for the file to upload before clicking the 'Submit' button.")
|
| 205 |
|
| 206 |
# gr components for video converter
|
|
@@ -208,14 +208,14 @@ input_file_c = gr.File(label="Select video file")
|
|
| 208 |
output_format_c = gr.Dropdown(choices=["mkv", "MOV", "mp4", "wav"], label="Select output format", value="mp4",)
|
| 209 |
output_file_c = gr.File(label="Download converted file")
|
| 210 |
|
| 211 |
-
interface_c = gr.Interface(fn=convert_video, inputs=[input_file_c, output_format_c], outputs=output_file_c, title="Video Converter",
|
| 212 |
description="Convert a video file to a different format. Please wait for the file to upload before clicking the 'Submit' button.")
|
| 213 |
|
| 214 |
|
| 215 |
# gr components for transcript sorter
|
| 216 |
input_file_s = gr.File(label="Select transcript file")
|
| 217 |
output_file_s = gr.File(label="Download sorted transcript")
|
| 218 |
-
interface_s = gr.Interface(fn=sort_transcript_wrapper, inputs=input_file_s, outputs=output_file_s, title="Transcript Sorter",
|
| 219 |
description="Sort a transcript file by time. Please wait for the file to upload before clicking the 'Submit' button.")
|
| 220 |
|
| 221 |
|
|
@@ -227,7 +227,7 @@ output_format_vtr = gr.Dropdown(choices=["mkv", "MOV", "mp4", "wav"], label="Sel
|
|
| 227 |
output_file_vtr = gr.File(label="Download trimmed file")
|
| 228 |
log_file_vtr = gr.File(label="Download log file")
|
| 229 |
interface_vtr = gr.Interface(fn=trim_video_vtr, inputs=[input_file_vtr, output_format_vtr],
|
| 230 |
-
outputs=[output_file_vtr, log_file_vtr],
|
| 231 |
title="Video Trimmer with Random Start Time",
|
| 232 |
description="This app trims a 10-minute interval from a video file. \
|
| 233 |
The start time is randomly selected between 5 and 15 minutes. \
|
|
@@ -243,7 +243,7 @@ end_time_wt = gr.Textbox(label="End time (in seconds or HH:MM:SS). Leave blank t
|
|
| 243 |
output_file_wt = gr.File(label="Download trimmed file")
|
| 244 |
output_transcript_wt = gr.File(label="Download trimmed transcript")
|
| 245 |
interface_wt = gr.Interface(fn=trim_video_wt, inputs=[input_file_wt, input_transcript_wt, output_format_wt, start_time_wt, end_time_wt],
|
| 246 |
-
outputs=[output_file_wt, output_transcript_wt], title="Video Trimmer with transcript converted",
|
| 247 |
description="Trim a video file to a specific time interval with transcript format converted. Please wait for the file to upload before clicking the 'Submit' button. \n\
|
| 248 |
This transcript should be .xlsx files from Happyscribe (an external transcription service). The columns in the file are as follows: \n\
|
| 249 |
`#`: an integer index over utterances. \n\
|
|
|
|
| 200 |
start_time = gr.Textbox(label="Start time (in seconds or HH:MM:SS). Leave blank to start at beginning.")
|
| 201 |
end_time = gr.Textbox(label="End time (in seconds or HH:MM:SS). Leave blank to trim a 5-minute interval since start.")
|
| 202 |
output_file = gr.File(label="Download trimmed file")
|
| 203 |
+
interface = gr.Interface(fn=trim_video, inputs=[input_file, output_format, start_time, end_time], outputs=output_file, title="Video Trimmer", flagging_mode="never",
|
| 204 |
description="Trim a video file to a specific time interval. Please wait for the file to upload before clicking the 'Submit' button.")
|
| 205 |
|
| 206 |
# gr components for video converter
|
|
|
|
| 208 |
output_format_c = gr.Dropdown(choices=["mkv", "MOV", "mp4", "wav"], label="Select output format", value="mp4",)
|
| 209 |
output_file_c = gr.File(label="Download converted file")
|
| 210 |
|
| 211 |
+
interface_c = gr.Interface(fn=convert_video, inputs=[input_file_c, output_format_c], outputs=output_file_c, title="Video Converter", flagging_mode="never",
|
| 212 |
description="Convert a video file to a different format. Please wait for the file to upload before clicking the 'Submit' button.")
|
| 213 |
|
| 214 |
|
| 215 |
# gr components for transcript sorter
|
| 216 |
input_file_s = gr.File(label="Select transcript file")
|
| 217 |
output_file_s = gr.File(label="Download sorted transcript")
|
| 218 |
+
interface_s = gr.Interface(fn=sort_transcript_wrapper, inputs=input_file_s, outputs=output_file_s, title="Transcript Sorter", flagging_mode="never",
|
| 219 |
description="Sort a transcript file by time. Please wait for the file to upload before clicking the 'Submit' button.")
|
| 220 |
|
| 221 |
|
|
|
|
| 227 |
output_file_vtr = gr.File(label="Download trimmed file")
|
| 228 |
log_file_vtr = gr.File(label="Download log file")
|
| 229 |
interface_vtr = gr.Interface(fn=trim_video_vtr, inputs=[input_file_vtr, output_format_vtr],
|
| 230 |
+
outputs=[output_file_vtr, log_file_vtr], flagging_mode="never",
|
| 231 |
title="Video Trimmer with Random Start Time",
|
| 232 |
description="This app trims a 10-minute interval from a video file. \
|
| 233 |
The start time is randomly selected between 5 and 15 minutes. \
|
|
|
|
| 243 |
output_file_wt = gr.File(label="Download trimmed file")
|
| 244 |
output_transcript_wt = gr.File(label="Download trimmed transcript")
|
| 245 |
interface_wt = gr.Interface(fn=trim_video_wt, inputs=[input_file_wt, input_transcript_wt, output_format_wt, start_time_wt, end_time_wt],
|
| 246 |
+
outputs=[output_file_wt, output_transcript_wt], title="Video Trimmer with transcript converted", flagging_mode="never",
|
| 247 |
description="Trim a video file to a specific time interval with transcript format converted. Please wait for the file to upload before clicking the 'Submit' button. \n\
|
| 248 |
This transcript should be .xlsx files from Happyscribe (an external transcription service). The columns in the file are as follows: \n\
|
| 249 |
`#`: an integer index over utterances. \n\
|