magical-tales / README.md
agharsallah
Add video
0f14d2b

A newer version of the Gradio SDK is available: 5.34.2

Upgrade
metadata
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! πŸ“šβœ¨

Magical Tales

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

Magical Tales Demo 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

  1. Installation: Run the following command to install the required dependencies:

    pip install -r requirements.txt
    
  2. 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.

πŸ“Έ Screenshots

App Screenshot