CoolFace
Apppublic

datascientist22/rag-moviegenre-dialogue

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
App README

Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference

๐ŸŽฌ Movie Query and Recommendation System ๐Ÿฟ

This Streamlit app allows users to query and get recommendations for movies based on a provided description. The app uses a pre-uploaded CSV file containing movie details, generates embeddings for the movie summaries, and retrieves the most relevant movie based on user input using cosine similarity. The application also provides additional context using the Groq API.

Features

  • โ€”Upload CSV File: Upload a CSV file with movie details, including columns like Title, Year, Rating, Summary, Movie Poster, and YouTube Trailer.
  • โ€”Movie Query: Enter a description or query related to a movie, and the app will return the most similar movie from the database.
  • โ€”Movie Details: Get detailed information about the retrieved movie, including the title, year, rating, summary, movie poster, and a link to the YouTube trailer.
  • โ€”Integration with Groq API: Uses the Groq API to provide additional context and insights based on the retrieved movie details.

Installation and Usage

To run this application locally, follow these steps:

  1. 1.Clone the Repository:
  2. 2.Open your terminal and run:
bash
     git clone https://github.com/mldatascientist23/Generative_AI_Projects.git
     cd Generative_AI_Projects
  1. 1.Create a `requirements.txt` File:
  2. 2.Inside the project directory, create a requirements.txt file with the following content:
bash
     streamlit
     pandas
     sentence-transformers
     scikit-learn
     numpy
     groq
  1. 1.Install the Dependencies:
  2. 2.Run the following command to install the required Python packages:
bash
     pip install -r requirements.txt
  1. 1.Set Up Streamlit Secrets:
  2. 2.In your Streamlit app directory, create a .streamlit directory.
  3. 3.Inside the .streamlit directory, create a secrets.toml file.
  4. 4.Add your Groq API key to the secrets.toml file like this:
toml
     GROQ_API_KEY = "your_groq_api_key_here"
  1. 1.Run the Streamlit App:
  2. 2.Start the app by running:
bash
     streamlit run movie_query_app.py
  1. 1.Use the App:
  2. 2.Upload a CSV File: Use the sidebar to upload your CSV file containing movie details.
  3. 3.Query a Movie: Enter a description or a query in the input field and click the "Get Movie Details" button.
  4. 4.View Results: The app will display the most similar movie based on your query, including the title, year, rating, summary, movie poster, and a link to the YouTube trailer.

Created by

Engr. Hamesh Raj