Download app.py from EdenSw/Vid2Sum: direct link, hf CLI and curl.
- Browser
- Download file 419 Bytes
-
https://huggingface.co/spaces/EdenSw/Vid2Sum/resolve/main/app.py
- Command line
-
hf download hf://spaces/EdenSw/Vid2Sum/app.py
-
curl -L -o app.py https://huggingface.co/spaces/EdenSw/Vid2Sum/resolve/main/app.py
419 Bytes
| import gradio as gr | |
| from API import aud2text, Summarize | |
| from moviepy.editor import * | |
| def Vid2Sum(vid_file): | |
| video = VideoFileClip(vid_file) | |
| audio_file = "converted_audio.mp3" | |
| video.audio.write_audiofile(audio_file) | |
| text = aud2text(audio_file) | |
| sum_text=Summarize(text["text"]) | |
| return sum_text[0]["summary_text"] | |
| iface = gr.Interface(fn=Vid2Sum, inputs="video", outputs="text") | |
| iface.launch() | |