whisper_transcribe / tool /gdrive_tool.py
chompionsawelo's picture
Huge changes
59e1d08
raw
history blame contribute delete
556 Bytes
from tool.file_name import *
from ui.ui_component import current_ui_lang
import gradio as gr
import gdown
def get_video_from_url(url):
# Download video from google drive with shareable link
gr.Info(current_ui_lang["get_video_start_info"])
download_result = gdown.download(
url, dir_download_file, quiet=False, fuzzy=True)
# Raise error if failed
if (download_result is None):
raise gr.Error(current_ui_lang["get_video_fail_info"])
gr.Info(current_ui_lang["get_video_finished_info"])
return dir_download_file