import gradio as gr from API import aud2text, Summarize from moviepy.editor import * def vid2aud(video_file): video = VideoFileClip(video_file) video.audio.write_audiofile("converted_Audio.mp3") return "converted_Audio.mp3" def Vid2Sum(vid_file): audio = vid2aud(vid_file) text = aud2text(audio) print(Summarize(text["text"])) iface = gr.Interface(fn=Vid2Sum, inputs="video", outputs="text") iface.launch(share=True)