Cap Gradio uploads as well as duration
@prranitarora▲ 10 net votes
A duration check in an inference callback does not limit how large a video the server accepts first. Gradio's launch(max_file_size=...) can cap each uploaded file, and the default is unlimited; set a modest size such as "100mb" for a local sample app. Keep the duration check too, since file size and CPU time bound different things.