A simple AI-powered Streamlit web application that analyzes YouTube thumbnails and provides feedback to make them more engaging and viewer-friendly.
- Upload a thumbnail image to get an analysis of its engagement potential.
- Feedback includes strengths, weaknesses, and tips for improvement.
- Clean, modern sidebar design with developer details and social media links.
- Easy-to-use interface built with Streamlit.
The directory structure of the project is as follows:
project-folder/
├── data/
│ ├── engaging/
│ │ ├── thumbnail1.jpg
│ │ ├── thumbnail2.jpg
│ ├── not_engaging/
│ │ ├── thumbnail3.jpg
│ │ ├── thumbnail4.jpg
├── app.py
├── fetch_data.py
├── train_model.py
Follow these steps to install the required dependencies for the project.
-
Clone the repository:
git clone https://github.com/your-username/your-repository.git cd your-repository
-
Set up a virtual environment:
python -m venv venv source venv/bin/activate # For Linux/Mac venv\Scripts\activate # For Windows
-
Install dependencies:
pip install -r requirements.txt
To fetch the data, follow these steps:
-
The script
fetch_data.py
is used to download and preprocess the data. -
Run the script as follows:
python src/fetch_data.py
-
Thumbnails will be downloaded at
/data
folder.
-
Once the data has been fetched, the next step is to train the model.
-
The script
train_model.py
is used to train the model and save it asthumbnail_model.h5
. -
Run the script as follows:
python src/train_model.py
-
This will train the model using the preprocessed data and save the trained model as
thumbnail_model.h5
in themodels/
folder.
-
Now that the model has been trained, you can run the Streamlit app to use the model in a web interface.
-
Navigate to the
app/
folder and run the Streamlit app using the following command:streamlit run app.py
-
This will start the Streamlit app, and you can interact with it through your web browser. The app will allow you to upload images and generate thumbnails using the trained model (
thumbnail_model.h5
).
Once the Streamlit app is running, follow these steps to interact with it:
- Open the web interface (usually available at
http://localhost:8501
). - Upload an image for processing.
- The app will tell how engaging is the uploaded image using the trained model and display it on the page.
- Python: Core programming language.
- Streamlit: Front-end for building the web app.
- TensorFlow/Keras: For AI model integration.
- YouTube Data API: Fetches video metadata (if applicable).
Contributions are welcome! To contribute:
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m "Description of changes"
- Push to your forked repository:
git push origin feature-name
- Submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for details.