This Streamlit application connects to a MongoDB database containing Airbnb rental data and provides a user-friendly interface to view, filter, and analyze the listings and their reviews. The app also includes functionality to add new reviews and generate AI-powered review summaries.
- View and filter Airbnb listings
- Display detailed information about selected listings
- Add new reviews to listings
- Generate AI summaries for reviews
- Python 3.7 or higher
- Streamlit
- MongoDB Atlas account: https://www.mongodb.com/docs/atlas/getting-started/
- OpenAI API key: https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key
-
Clone the repository:
git clone https://github.com/mongodb-developer/stream-airbnb-ai-reviews.git cd stream-airbnb-ai-reviews -
Install the required packages:
pip install -r requirements.txt
-
Set up environment variables:
MONGODB_ATLAS_URI: Your MongoDB Atlas connection stringOPENAI_API_KEY: Your OpenAI API key
You can create a
.envfile in the root directory and add the following:MONGODB_ATLAS_URI=your_mongodb_atlas_uri OPENAI_API_KEY=your_openai_api_key
-
Ingest data using Hugging Face free token from airbnb hugging face data set:
huggingface-cli login
python ingest.py- Run the Streamlit app:
streamlit run app.py
You should be able to now operate the UI and add reviews and generate AI based reviews.