Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

15 Commits

Folders and files

Repository files navigation

Mood Book Recommender

A web app and API that recommends books based on your current mood using AI and OpenLibrary.

Features

  • Enter your mood or feelings and get book recommendations.
  • Uses an LLM (OpenRouter) for mood detection.
  • Fetches books from OpenLibrary by mood category.
  • Streamlit web interface and Flask API endpoint.

Getting Started

1. Clone the repository

git clone https://github.com/junaidaslam2006/mood-book-recommender.git
cd mood-book-recommender

2. Create and activate a virtual environment

python -m venv .venv
& .venv\Scripts\Activate.ps1

3. Install dependencies

pip install --upgrade pip
pip install -r requirements.txt

4. Set up your .env file

Copy .env.example to .env and add your OpenRouter API key:

OPENROUTER_API_KEY=your-key-here

5. Run the Streamlit app

streamlit run app.py

6. (Optional) Run the Flask API

python api.py

API Usage

POST to /recommend with JSON:

{
	"mood_text": "I am feeling happy today"
}

Returns recommended books.

Project Structure

├── app.py                # Streamlit app
├── api.py                # Flask API
├── requirements.txt      # Python dependencies
├── .env                  # API keys (not tracked)
├── src/
│   ├── sentiment_analysis.py
│   └── openlibrary_test.py
├── data/
│   └── book_embeddings.npy (optional)

LIVE URL : https://junaidaslam2006-mood-book-recommender-app-qcpoza.streamlit.app/

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages