Skip to content

alimdsaif3/Image-to-Story-Converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🏰 Image to Speech GenAI Tool 🌟♨️

An innovative AI tool that generates audio short stories based on the context of uploaded images. It leverages cutting-edge GenAI models from Hugging Face, OpenAI, and LangChain, and is deployed on both Streamlit Cloud and Hugging Face Space.


📢 Deployments

Run App on Streamlit Cloud

Launch App On Streamlit

Run App on HuggingFace Space Cloud

Launch App On HuggingFace Space


🎯 Key Features

  1. Image to Text

  2. Text to Story

    • Utilizes OpenAI's GPT-3.5-Turbo model to create a short, imaginative story (default: 50 words) from the descriptive text.
  3. Story to Speech

  4. User-Friendly Interface

    • Built with Streamlit for easy image uploading and playback of generated audio.

📈 System Design

System Design Diagram


📂 Demo

Couple Test Image Output

Couple Test Image Output
Audio file available in the img-audio folder.

Family Test Image Output

Family Test Image Output
Audio file available in the img-audio folder.

Picnic Test Image Output

Picnic Vacation Test Image Output
Audio file available in the img-audio folder.


🌟 Requirements

The following libraries and tools are required:

  • os
  • python-dotenv
  • transformers
  • torch
  • langchain
  • openai
  • requests
  • streamlit

🚀 Usage

Prerequisites

  • Obtain personal API tokens for Hugging Face and OpenAI.
  • Save the tokens in a .env file with the following format:
    OPENAI_API_KEY=<your-api-key-here>  
    HUGGINGFACE_API_TOKEN=<your-access-token-here>  
    

Steps

Set up a virtual environment (venv) and install dependencies:

pip install -r requirements.txt

Run the app:

streamlit run app.py

Upload an image via the app interface.

The app will: Generate descriptive text for the uploaded image.

Create a short story based on the text.

Provide a playable audio file of the narrated story.

▶️ Installation

Clone the Repository

git clone https://github.com/alimdsaif3/Image-to-Story-Converter.git

Install Dependencies

pip install -r requirements.txt

Run the App Locally

streamlit run app.py

©️ License This project is distributed under the MIT License. For details, see the LICENSE file in the repository.

🤝 Contributions If you like this project, please ⭐ the repository! Contributions are welcome. Submit a pull request if you have suggestions or enhancements.


If you like this LLM Project do drop ⭐ to this repo

Follow me on LinkedIn   GitHub


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages