Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -27,15 +27,12 @@ def transcode_video(input_video_file, output_file, output_format, output_fps):
|
|
27 |
# Return the path to the transcoded file.
|
28 |
return output_file
|
29 |
|
30 |
-
def name_file(
|
31 |
-
return
|
32 |
|
33 |
-
|
34 |
-
return file.name
|
35 |
|
36 |
-
|
37 |
-
|
38 |
-
outputs={"output_file": File(name_file(get_file_name(input_video_file)), accept=".m3u8", name="Output File")}
|
39 |
|
40 |
gr.Interface(
|
41 |
transcode_video,
|
|
|
27 |
# Return the path to the transcoded file.
|
28 |
return output_file
|
29 |
|
30 |
+
def name_file(file_path):
|
31 |
+
return os.path.basename(file_path)
|
32 |
|
33 |
+
input_video_file = File(accept=".mp4, .mov, .avi, .flv, .wmv, .mpeg, .mpg, .ogg, .webm")
|
|
|
34 |
|
35 |
+
outputs={"output_file": File(name_file(input_video_file), accept=".m3u8")}
|
|
|
|
|
36 |
|
37 |
gr.Interface(
|
38 |
transcode_video,
|