-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.py
More file actions
40 lines (30 loc) · 1.15 KB
/
app.py
File metadata and controls
40 lines (30 loc) · 1.15 KB
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
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
# Copyright (c) 2025 Jack Pollard
# app.py
import gradio as gr
# Import page modules
import pages.home_page as home_page
import pages.story_page as story_page
import pages.joke_page as joke_page
import pages.learn_page as learn_page
import pages.parents_page as parents_page
# Import theme
from ui.theme import kids_theme, multipage_css
# --- Build the Multipage Gradio App ---
with gr.Blocks(theme=kids_theme, title="KidsAI Playground", css=multipage_css) as demo:
# Render the home page content in the default Home tab
home_page.demo.render()
# Add separate pages using routes
with demo.route("📖 Story Time", "/story"):
story_page.demo.render()
with demo.route("😂 Joke Factory", "/jokes"):
joke_page.demo.render()
with demo.route("🧠 Fun Learning", "/learn"):
learn_page.demo.render()
with demo.route("🫂 Parents/Guardians", "/parents"):
parents_page.demo.render()
# --- Launch the App ---
if __name__ == "__main__":
demo.launch()