File size: 7,356 Bytes
5c21a0d
cd58e6b
5c21a0d
cd58e6b
 
 
 
 
 
 
 
bce3dbc
 
cd58e6b
 
3fab083
 
cd58e6b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5a2e5ec
cd58e6b
 
3fab083
cd58e6b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3fab083
cd58e6b
3fab083
 
cd58e6b
 
3fab083
cd58e6b
 
 
3fab083
bce3dbc
cd58e6b
 
 
 
3c69062
cd58e6b
 
 
 
 
3e29eba
 
cd58e6b
 
 
 
 
 
 
5ff6d0b
cd58e6b
 
3fab083
cd58e6b
 
 
 
 
3fab083
bce3dbc
cd58e6b
 
 
 
 
 
bce3dbc
cd58e6b
 
 
 
 
3fab083
cd58e6b
 
 
 
a5c8e5e
 
cd58e6b
 
 
 
 
 
 
 
 
 
a5c8e5e
cd58e6b
 
3fab083
cd58e6b
 
 
 
 
 
3fab083
cd58e6b
 
 
 
3fab083
cd58e6b
 
bce3dbc
5c21a0d
0853bf6
 
cd58e6b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5c21a0d
cd58e6b
 
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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
import gradio as gr
import os

# --- CSS STYLING (Replicating the dark purple UI) ---
# We inject custom CSS to make it match your screenshot design.
custom_css = """
/* Overall App Background */
.gradio-container {
    background-color: #121212 !important;
    color: #E0E0E0 !important;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header Section */
.main-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
    background-color: #1e1e1e;
    border-bottom: 1px solid #333;
}
.header-logo {
    font-size: 1.5em;
    font-weight: bold;
    color: #FFC107; /* Yellow AMINA text */
}
.header-title {
    color: #E0E0E0;
    font-weight: 300;
}
.header-nav {
    display: flex;
    gap: 20px;
    color: #BDBDBD;
}
.header-nav a:hover {
    color: #BB86FC; /* Purple accent on hover */
}

/* Sidebar Styling */
.sidebar {
    background-color: #1e1e1e !important;
    padding: 20px !important;
    border-right: 1px solid #333;
}
.new-project-btn button {
    background-color: #BB86FC !important;
    color: black !important;
    border-radius: 8px !important;
    font-weight: bold;
}
.recent-projects-label {
    color: #757575;
    margin-top: 30px;
    margin-bottom: 10px;
    font-size: 0.9em;
}
.project-item {
    padding: 10px;
    border-radius: 5px;
    color: #E0E0E0;
    cursor: pointer;
}
.project-item:hover {
    background-color: #333;
}
.project-item.active {
    background-color: #212121;
    border-left: 3px solid #BB86FC;
}

/* Main Content Area */
.content-area {
    background-color: #121212 !important;
    padding: 30px !important;
}
.video-title {
    font-size: 1.8em;
    font-weight: bold;
    color: #E0E0E0;
    margin-bottom: 20px;
}

/* Video Display Box */
.video-box {
    background-color: #1e1e1e;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1px solid #333;
}
.video-box .wrap {
    background-color: #000; /* Black background for video player */
}
.video-description {
    color: #BDBDBD;
    font-size: 0.95em;
    line-height: 1.5em;
    margin-top: 15px;
}

/* Prompt Input Box */
.prompt-box {
    background-color: #1e1e1e;
    border-radius: 12px;
    padding: 15px;
    border: 1px solid #333;
}
.prompt-box textarea {
    background-color: transparent !important;
    color: #E0E0E0 !important;
    border: none !important;
    font-size: 1.1em;
}
.prompt-box .label {
    display: none !important; /* Hide standard label */
}
.tag-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}
.tag-btn {
    background-color: #333 !important;
    color: #E0E0E0 !important;
    border: none !important;
    border-radius: 20px !important;
    padding: 5px 15px !important;
    font-size: 0.85em;
    cursor: pointer;
}
.tag-btn:hover {
    background-color: #444 !important;
}
.icon-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 10px;
    color: #BB86FC; /* Purple icon color */
}
.icon-row .left-icons, .icon-row .right-icons {
    display: flex;
    gap: 15px;
    font-size: 1.2em;
}
.icon-row svg {
    cursor: pointer;
}

"""

# --- GRADIO UI LAYOUT ---

with gr.Blocks(css=custom_css, theme=gr.themes.Base()) as demo:
    
    # 1. Header Component (Custom HTML to match screenshot)
    gr.HTML("""
    <div class="main-header">
        <div class="header-logo"><span style="color: #FFC107;">AMINA</span><br>X STUDIO</div>
        <div class="header-nav">
            <a href="#">🏠 Home</a>
            <a href="#">📁 My Library</a>
            <a href="#">🧩 Template</a>
            <a href="#">💲 Pricing</a>
        </div>
        <div class="header-profile">
            <img src="https://api.dicebear.com/8.x/adventurer/svg?seed=Alexander" style="width:40px; height:40px; border-radius:50%;" alt="Avatar">
        </div>
    </div>
    """)
    
    with gr.Row(elem_classes="content-area"):
        
        # 2. Sidebar Component
        with gr.Column(scale=1, elem_classes="sidebar"):
            gr.Button("+ New Project", elem_classes="new-project-btn")
            gr.Markdown("Recent Project", elem_classes="recent-projects-label")
            
            # Project List Items (Clickable placeholders)
            gr.HTML('<div class="project-item active">Wonders of the Amazon</div>')
            gr.HTML('<div class="project-item">NBA Documentary</div>')
            gr.HTML('<div class="project-item">Kalvin and the Jungle...</div>')

        # 3. Main Content Component
        with gr.Column(scale=4):
            gr.Markdown("Wonders of the Amazon", elem_classes="video-title")
            
            # Video Player & Description Box
            with gr.Column(elem_classes="video-box"):
                gr.Video(value="https://videos.pexels.com/video-files/8543534/8543534-sd_540_960_25fps.mp4", label="Project Video")
                gr.Markdown("""
                    A slow, cinematic drone shot flying toward a massive, hidden waterfall deep within the Amazon rainforest. 
                    The waterfall plunges over 200 feet down a moss-covered cliff face, crashing into a turquoise pool below. 
                    Thick white mist rises from the base, catching golden sunlight. Surrounding the waterfall are ancient trees draped in 
                    vines, bromeliads, and bright pink and orange orchids. A rainbow forms in the spray. Scarlet macaws fly across 
                    the frame. Howler monkeys call in the distance. The camera slowly orbits around the waterfall, revealing the 
                    lush canopy stretching endlessly in all directions. Warm, humid atmosphere, golden hour lighting, 
                    photorealistic, 8K, BBC Planet Earth style,
                """, elem_classes="video-description")

            # Prompt Input Section
            with gr.Column(elem_classes="prompt-box"):
                gr.HTML("""
                    <div class="tag-buttons">
                        <button class="tag-btn">Unreal Landscape</button>
                        <button class="tag-btn">Cyberpunk Tokyo</button>
                        <button class="tag-btn">Animal/Wildlife</button>
                        <button class="tag-btn">Historical</button>
                    </div>
                """)
                # Actual Gradio Textbox, styled via CSS above
                gr.Textbox(placeholder="What video do you have in mind? AMINA can help you out", lines=1, show_label=False)
                
                # Bottom Icons (Placeholders for icons)
                gr.HTML("""
                    <div class="icon-row">
                        <div class="left-icons">
                            <span>🖼️</span>
                            <span style="font-weight:bold; font-size:1em;">📺 16:9</span>
                            <span>⬇️</span>
                            <span>✨</span>
                        </div>
                        <div class="right-icons">
                            <span>💾</span>
                            <span>⬆️</span>
                        </div>
                    </div>
                """)

# --- LAUNCH ---
if __name__ == "__main__":
    # Important: Share=True makes it accessible via public URL
    demo.launch(server_name="0.0.0.0", server_port=7860)