File size: 2,272 Bytes
b14d715
69af42a
b14d715
 
 
 
 
 
 
 
 
 
3b3823d
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
69af42a
3b3823d
 
 
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
41
42
43
---
title: Story Generation
emoji: πŸƒ
colorFrom: gray
colorTo: yellow
sdk: gradio
sdk_version: 5.17.1
app_file: app.py
pinned: false
---

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
# AI Kids' Story Generator - English & Arabic

## Project Objectives
The AI Kids' Story Generator aims to create engaging and imaginative short stories for children. Users can input a character name and a setting, and the model will generate a fun story in either English or Arabic. This project leverages advanced natural language processing techniques to provide a creative tool for storytelling.

## Implemented Pipelines
The project uses the following pipelines from the `transformers` library:

1. **Text Generation Pipeline**: 
   - **Model**: The model adapts based on the selected language. For English, it uses the `microsoft/Phi-3-mini-4k-instruct` model, while for Arabic, it employs the `ALLaM-AI/ALLaM-7B-Instruct-preview` model.

## Instructions for Using the Interface
1. **Input Fields**:
   - **Character Name**: Enter a name for the story's main character.
   - **Setting**: Specify the story's setting (e.g., a magical forest).
   - **Choose Language**: Select the desired language for the story (English or Arabic).

2. **Generate Story**: Click the "Submit" button to generate the story. The output will be displayed in the "Kids' Story" textbox.

3. **Examples**: The interface includes examples you can use to see how the app functions. Simply click on an example to populate the fields.

## Justifications for Model and Pipeline Choices
- **Model Selection**: The chosen models are specifically designed for instruction-following tasks, making them suitable for generating narratives. The English model (`microsoft/Phi-3-mini-4k-instruct`) has been optimized for various textual tasks, while the Arabic model (`ALLaM-AI/ALLaM-7B-Instruct-preview`) is tailored for Arabic language generation.
- **Pipeline Configuration**: The parameters for the text generation pipeline were chosen to encourage creativity and engagement, essential for children's stories.

## Bilingual Implementation
The project supports both English and Arabic languages, allowing users to receive stories in their preferred language. 

---