datascientist22/rag-moviegenre-dialogue
0
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, andYouTube 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:
- Clone the Repository:
- Open your terminal and run:
git clone https://github.com/mldatascientist23/Generative_AI_Projects.git
cd Generative_AI_Projects- Create a `requirements.txt` File:
- Inside the project directory, create a
requirements.txtfile with the following content:
streamlit
pandas
sentence-transformers
scikit-learn
numpy
groq- Install the Dependencies:
- Run the following command to install the required Python packages:
pip install -r requirements.txt- Set Up Streamlit Secrets:
- In your Streamlit app directory, create a
.streamlitdirectory. - Inside the
.streamlitdirectory, create asecrets.tomlfile. - Add your Groq API key to the
secrets.tomlfile like this:
GROQ_API_KEY = "your_groq_api_key_here"- Run the Streamlit App:
- Start the app by running:
streamlit run movie_query_app.py- Use the App:
- Upload a CSV File: Use the sidebar to upload your CSV file containing movie details.
- Query a Movie: Enter a description or a query in the input field and click the "Get Movie Details" button.
- 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.
