| | import gradio as gr |
| | import time |
| |
|
| | def generate_video(prompt): |
| | |
| | |
| | time.sleep(2) |
| | return "https://www.youtube.com/watch?v=isoCNqQeMv8" |
| |
|
| | |
| | custom_css = """ |
| | body {background-color: #0F172A; color: white;} |
| | .gradio-container {background-color: #0F172A; border: none;} |
| | h1 {color: #4ADE80; font-family: 'Arial', sans-serif;} |
| | """ |
| |
|
| | with gr.Blocks(css=custom_css) as demo: |
| | gr.Markdown("# 🧠 Zulense AI: Class 8 & 9 Math Tutor") |
| | gr.Markdown("Type a math question below (e.g., 'Explain Pythagoras Theorem') and watch the AI generate a video.") |
| | |
| | with gr.Row(): |
| | input_text = gr.Textbox(label="Enter Math Question", placeholder="Type here...") |
| | generate_btn = gr.Button("Generate Video 🎥", variant="primary") |
| | |
| | output_video = gr.Video(label="AI Generated Explanation") |
| | |
| | generate_btn.click(fn=generate_video, inputs=input_text, outputs=output_video) |
| |
|
| | demo.launch() |