File size: 883 Bytes
0a92340
 
 
 
 
 
 
9f2addb
0a92340
 
b92d77f
0a92340
46982c4
16ced43
46982c4
16ced43
0a92340
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
import gradio as gr
from youtube_extractor import YouTubeExtractor

extractor = YouTubeExtractor()

def process_youtube_url(youtube_url):
    metadata, best_video_only, best_audio_only, best_combined = extractor.extract_info(youtube_url)
    return extractor.format_output(metadata, best_video_only, best_audio_only, best_combined)

with gr.Blocks() as demo:
    gr.Markdown("## Extractor de video y audio por separado de YouTube")
    
    youtube_url_input = gr.Textbox(label="Ingrese la URL de YouTube")
    extract_button = gr.Button("Extracci贸n de informaci贸n")
    output = gr.Textbox(label="Informaci贸n extra铆da", lines=10)
    download_links = gr.HTML(label="Enlaces de descarga:")
    
    extract_button.click(
        fn=process_youtube_url,
        inputs=youtube_url_input,
        outputs=[output, download_links]
    )

if __name__ == "__main__":
    demo.launch()