Spaces:
Running
on
Zero
Running
on
Zero
A newer version of the Gradio SDK is available:
5.19.0
metadata
title: Storyteller
emoji: π
colorFrom: purple
colorTo: indigo
sdk: gradio
sdk_version: 5.18.0
app_file: app.py
pinned: false
license: apache-2.0
π Storyteller AI
Overview
Storyteller is an AI-powered creative writing assistant that generates stories in Arabic based on user prompts. The application leverages the ALLaM-7B-Instruct model to create engaging narratives across various genres, with adjustable creativity levels and generation parameters.
Features
- Arabic-Optimized Interface: Full right-to-left (RTL) support for Arabic text input and output
- Multiple Genres: Generate stories across 10 different genres including adventure, sci-fi, mystery, and more
- Customizable Creativity: Choose between traditional, moderate, or experimental writing styles
- Advanced Parameters: Fine-tune temperature and Top-P values for precise control over generation
- Example Prompts: Get inspired with ready-to-use story starters
Technical Details
Model
- Base Model: ALLaM-7B-Instruct-preview
- Architecture: 7 billion parameter language model optimized for creative text generation
- GPU Acceleration: Utilizes CUDA for faster inference
Implementation
- Framework: Built with Gradio 5.18.0
- Pipeline Architecture: Uses Hugging Face Transformers Pipeline as the core component:
from transformers import pipeline # Create the text generation pipeline generator = pipeline( "text-generation", model=model, tokenizer=tokenizer, device=0 # Use GPU ) # Generate text with the pipeline response = generator( prompt, max_length=max_length, temperature=temperature, top_p=top_p, do_sample=True )
- GPU Handling: Uses Hugging Face Spaces GPU support with ZeroGPU for efficient resource allocation
- Prompt Engineering: Enhanced prompting technique for better story structure and coherence
Dependencies
- transformers
- torch
- gradio
- huggingface_hub
- spaces (Hugging Face-specific package)
Development
This project is built and deployed on Hugging Face Spaces. The interface is designed to be intuitive and visually appealing while providing powerful customization options for story generation.
License
Apache License 2.0
Created by abdul4h - Powered by Hugging Face Spaces