Add proper UI for quote video generator
Browse files
app.py
CHANGED
|
@@ -1,7 +1,65 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
def
|
| 4 |
-
|
|
|
|
| 5 |
|
| 6 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
demo.launch()
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
def generate_quote_video(niche, style):
|
| 4 |
+
# Placeholder for now - we'll build this next
|
| 5 |
+
return f"Generating {style} {niche} quote video... (Coming soon!)"
|
| 6 |
|
| 7 |
+
with gr.Blocks(title="AIQuoteClipGenerator", theme=gr.themes.Soft()) as demo:
|
| 8 |
+
gr.Markdown("""
|
| 9 |
+
# π¬ AIQuoteClipGenerator
|
| 10 |
+
### Automated Quote Videos for Instagram & TikTok
|
| 11 |
+
Generate aesthetic quote videos in seconds with AI
|
| 12 |
+
""")
|
| 13 |
+
|
| 14 |
+
with gr.Row():
|
| 15 |
+
with gr.Column():
|
| 16 |
+
niche = gr.Dropdown(
|
| 17 |
+
choices=[
|
| 18 |
+
"Motivation",
|
| 19 |
+
"Business/Entrepreneurship",
|
| 20 |
+
"Fitness",
|
| 21 |
+
"Mindfulness",
|
| 22 |
+
"Stoicism",
|
| 23 |
+
"Leadership",
|
| 24 |
+
"Love & Relationships"
|
| 25 |
+
],
|
| 26 |
+
label="π Select Niche",
|
| 27 |
+
value="Motivation"
|
| 28 |
+
)
|
| 29 |
+
|
| 30 |
+
style = gr.Dropdown(
|
| 31 |
+
choices=[
|
| 32 |
+
"Cinematic",
|
| 33 |
+
"Nature",
|
| 34 |
+
"Urban",
|
| 35 |
+
"Minimal",
|
| 36 |
+
"Abstract"
|
| 37 |
+
],
|
| 38 |
+
label="π¨ Visual Style",
|
| 39 |
+
value="Cinematic"
|
| 40 |
+
)
|
| 41 |
+
|
| 42 |
+
generate_btn = gr.Button("β¨ Generate Video", variant="primary", size="lg")
|
| 43 |
+
|
| 44 |
+
with gr.Column():
|
| 45 |
+
output = gr.Textbox(label="π€ Status", lines=3)
|
| 46 |
+
video_output = gr.Video(label="π₯ Generated Video")
|
| 47 |
+
|
| 48 |
+
gr.Markdown("""
|
| 49 |
+
---
|
| 50 |
+
### π How It Works
|
| 51 |
+
1. **Select your niche** - Choose the type of content
|
| 52 |
+
2. **Pick a style** - Choose visual aesthetic
|
| 53 |
+
3. **Generate** - AI creates quote + video + overlay
|
| 54 |
+
4. **Download** - Ready to post!
|
| 55 |
+
|
| 56 |
+
*Built for MCP 1st Birthday Hackathon*
|
| 57 |
+
""")
|
| 58 |
+
|
| 59 |
+
generate_btn.click(
|
| 60 |
+
generate_quote_video,
|
| 61 |
+
inputs=[niche, style],
|
| 62 |
+
outputs=output
|
| 63 |
+
)
|
| 64 |
+
|
| 65 |
demo.launch()
|