A newer version of the Gradio SDK is available:
5.34.2
title: Magical Tales
emoji: π
colorFrom: green
colorTo: yellow
sdk: gradio
sdk_version: 5.32.1
app_file: app.py
pinned: true
thumbnail: assets/images/wizard.png
description: >
Magical Tales is a Gradio application that uses a range of LLMs and tools to
create personalized, immersive stories for children. Customize story types,
tones, and more to spark imagination and creativity!
tags:
- agent-demo-track
- mcp-server-track
keywords:
- gradio
- Modal
- Nebius
- sambanova
- mistral
- llamaindex
- Dia-1.6B
- Meta musicGen
- stories
- children
- mcp
- interactive
- pdf
- customization
- imagination
- creativity
- agent-demo-track
- mcp-server-track
repository: agharsallah/magical-tales
π Magical Tales: Where Imagination Comes Alive! πβ¨
Welcome to Magical Tales, a Gradio application that harnesses the power of SambaNova API to craft personalized, immersive stories for children. Our app is designed to spark imagination and creativity, offering a wide array of customization options to suit various tastes and preferences:
πΉ Story Crafting: Choose from diverse story types (Historical, Futuristic, Fantasy), tones (Funny, Enthusiastic, Mysterious), and tailor the narrative based on the child's age, language preference, interests, and the subject of the story. πΉ Enhanced Context: Optionally, upload a PDF document to provide additional context for the story, making it even more personalized and relevant. πΉ Interactive Experience: Built with Gradio, our application offers an intuitive and interactive user interface, making story generation a delightful experience for both children and parents.
Youtube Video
β¨ Watch Magical Tales in Action! β¨
π Getting Started
βοΈ Configuration
You can configure the app using environment variables. For example, to set the SambaNova API key, you can use the SAMBANOVA_API_KEY
environment variable:
- Through the Gradio web interface in the "API Settings" section
- By creating a
.env
file in the root directory (check.env.example
for reference)
When deploying to Hugging Face Spaces, set this as a Secret in the Settings tab.
See the Gradio documentation for more information.
π§ Setup
Installation: Run the following command to install the required dependencies:
pip install -r requirements.txt
Running Locally: Start the application by executing:
python app.py
π― Features
- π Multi-Language Support: Generate stories in various languages to cater to a global audience.
- πΆ Audio Narration: Listen to the generated stories with integrated audio narration for an immersive experience.
- π΅ Background Music: Enjoy background music while listening to the stories, enhancing the overall experience.
- π¨ Image Generation: Generate images to accompany the stories, bringing characters and scenes to life.
- π₯οΈ Interactive UI: User-friendly Gradio interface for seamless story generation.
- π PDF Context Integration: Enhance story generation with additional context from uploaded PDF documents.
- π Customizable Narratives: Tailor stories based on story type, tone, child's age, language, interests, and subject.
π Demo
Experience the magic of our Dynamic Story Generator in action! Check out our live demo here.
π Deployment
This application is optimized for Hugging Face Spaces. Simply push this repository to a Hugging Face Space and add the SAMBANOVA_API_KEY
as a Secret in the Space settings.