File size: 1,813 Bytes
d08ffde
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
import gradio as gr

YOUTUBE_LINKS = [
    "https://www.youtube.com/watch?v=g30KR9VNXS0",
    "https://www.youtube.com/watch?v=g30KR9VNXS0",
    "https://www.youtube.com/watch?v=g30KR9VNXS0",
    "https://www.youtube.com/watch?v=g30KR9VNXS0",
    "https://www.youtube.com/watch?v=g30KR9VNXS0",
    "https://www.youtube.com/watch?v=g30KR9VNXS0",
    "https://www.youtube.com/watch?v=g30KR9VNXS0",
    "https://www.youtube.com/watch?v=g30KR9VNXS0",
    "https://www.youtube.com/watch?v=g30KR9VNXS0",
    "https://www.youtube.com/watch?v=g30KR9VNXS0",
]

def youtube_embed(url):
    video_id = url.split("v=")[-1]
    return f"""
    <iframe
        width="100%"
        height="220"
        src="https://www.youtube-nocookie.com/embed/{video_id}?rel=0&modestbranding=1"
        frameborder="0"
        allow="accelerometer; encrypted-media; gyroscope; picture-in-picture"
        allowfullscreen>
    </iframe>
    """

css = """
body {
    background-color: #0b0f19;
}
.tc-header {
    font-size: 34px;
    font-weight: 800;
    color: #e5e7eb;
    margin-bottom: 6px;
}
.tc-sub {
    font-size: 14px;
    color: #9ca3af;
    margin-bottom: 24px;
}
.video-card {
    background: #111827;
    border-radius: 14px;
    padding: 10px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.45);
}
"""

with gr.Blocks(css=css, theme=gr.themes.Soft()) as demo:
    gr.HTML("""
    <div class="tc-header">TC Channel — Curated Videos</div>
    <div class="tc-sub">
        Only selected videos • No recommendations • Clean playback
    </div>
    """)

    for i in range(0, 10, 3):
        with gr.Row():
            for j in range(3):
                if i + j < 10:
                    gr.HTML(
                        f"<div class='video-card'>{youtube_embed(YOUTUBE_LINKS[i + j])}</div>"
                    )

demo.launch()