This Streamlit app allows users to explore and query a movie database using natural language. It leverages a Neo4j graph database and the Gemini Pro language model to provide insightful answers about movie connections.
-
Clone the repository:
git clone https://github.com/jayasuryagunasekharan/movies-graph-search-tool cd movie-graph-search-tool
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- On Windows:
venv\Scripts\activate
- On macOS and Linux:
source venv/bin/activate
- On Windows:
-
Install the required libraries:
pip install -r requirements.txt
-
Create a
.env
file in the project root directory with the following content:GOOGLE_API_KEY=your_google_api_key NEO4J_URI=your_neo4j_uri NEO4J_USERNAME=your_neo4j_username NEO4J_PASSWORD=your_neo4j_password
-
Replace the placeholder values with your actual credentials:
your_google_api_key
: Your Google API key for accessing the Gemini Pro modelyour_neo4j_uri
: The URI of your Neo4j database (e.g.,neo4j+s://xxxxxxxx.databases.neo4j.io
)your_neo4j_username
: Your Neo4j database usernameyour_neo4j_password
: Your Neo4j database password
To run the app locally, use the following command:
streamlit run app.py
The app should now be accessible at http://localhost:8501
.
-
Create a GitHub repository and push your code to it.
-
Log in to Streamlit Cloud.
-
Click on "New app" and select your GitHub repository.
-
In the app settings:
- Set the Python file path to
app.py
- Add the following secrets under the "Secrets" section:
GOOGLE_API_KEY = "your_google_api_key" NEO4J_URI = "your_neo4j_uri" NEO4J_USERNAME = "your_neo4j_username" NEO4J_PASSWORD = "your_neo4j_password"
- Set the Python file path to
-
Click "Deploy" to launch your app on Streamlit Cloud.
- If you encounter connection issues with Neo4j, ensure that your database is running and accessible from your deployment environment.
- For Neo4j Aura users, make sure to whitelist the IP address of your Streamlit Cloud instance in the Neo4j Aura console.
- Check the Streamlit Cloud logs for any error messages or connection issues.
Contributions are welcome! Please feel free to submit a Pull Request.
#My Streamlit Deployment Link
https://movies-graph-search-tool-5pgyzv7ezyh2em53cjxspr.streamlit.app/