import gradio as gr from pytube import YouTube def download_video(url): try: yt = YouTube(url) stream = yt.streams.get_highest_resolution() stream.download() return f"Видео '{yt.title}' успешно скачано!" except Exception as e: return f"Ошибка: {str(e)}" iface = gr.Interface( fn=download_video, inputs="text", outputs="text", title="chalukerTOOLS - Скачивание видео с YouTube", description="Введите URL видео с YouTube, чтобы скачать его." ) iface.launch()