File size: 1,685 Bytes
b0359f9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
44
45
46
47
48
49
50
51
52
# Gradio Application

<img src="image_logo.png" style="width:50%; height:auto;">


This is a Gradio application that allows you to generate an Arabic story using generative AI models.

## Installation

1. Clone this repository:

    ```shell
    git clone https://github.com/mohammad-albarham/Arabic_story_generator.git
    ```

2. Install the required dependencies:

    ```shell
    pip install -r requirements.txt
    ```

## Usage

0. Add the keys for OPEN AI API model and stability AI API in [models.py](https://github.com/mohammad-albarham/Arabic_story_generator/blob/3702d6cad85fe38ff5944d7f99f43a37d7dec151/llm_models.py#L16) and [image_generator.py](https://github.com/mohammad-albarham/Arabic_story_generator/blob/3702d6cad85fe38ff5944d7f99f43a37d7dec151/image_generator.py#L22)
1. Run the application:

    ```shell
    gradio app.py
    ```

2. Open your web browser and navigate to [http://localhost:7860](http://localhost:7860).

3. Add your a description and the needed number of pages and click on generate story.

## Contributing

Contributions are welcome! If you find any issues or have suggestions for improvements, please open an issue or submit a pull request.

### Instrcutions for the contribution:

1. Please install black formatter as follows:
`pip install black`
2. Make sure to format all python files you want to change using this command on the terminal:
`black .`

You can see this tutorial for more information about the formatter: [tutorial](https://www.freecodecamp.org/news/auto-format-your-python-code-with-black/)


## License

[ACADEMIC PUBLIC LICENSE](https://github.com/mohammad-albarham/Arabic_story_generator/tree/main?tab=License-1-ov-file)