This project is an AI-powered travel planner designed to help students create personalized and budget-friendly itineraries. Users can input their starting location, destination, budget, travel dates, and interests, and the application will generate a detailed itinerary using the Gemini API.
- Personalized Itineraries: Generates customized travel plans based on user preferences.
- Budget-Friendly: Considers budget constraints for accommodation, transportation, and activities.
- Interactive Map: Displays starting and destination locations on a map using Folium.
- Real-time Feedback: Provides loading indicators and messages during geocoding and itinerary generation.
- Customizable Budget: Allows users to input a custom budget range and currency.
- Python 3.8+
pip(Python package installer)
-
Clone the repository (if applicable):
git clone <your-repository-url> cd <your-repository-name>
-
Install dependencies:
pip install -r requirements.txt
(Note: You may need to create a
requirements.txtfile first if it doesn't exist, by runningpip freeze > requirements.txt)
-
Obtain a Gemini API Key:
- Go to the Google AI Studio and create an API key.
-
Create
secrets.toml:- In the root directory of your project, create a folder named
.streamlit. - Inside the
.streamlitfolder, create a file namedsecrets.toml.
- In the root directory of your project, create a folder named
-
Add your API key to
secrets.toml:- Open
secrets.tomland add the following line, replacing"YOUR_API_KEY"with your actual Gemini API key:GEMINI_API_KEY = "YOUR_API_KEY"
- Open
-
Start the Streamlit application:
streamlit run app.py
-
Access the application:
- Open your web browser and navigate to the URL provided by Streamlit (usually
http://localhost:8501).
- Open your web browser and navigate to the URL provided by Streamlit (usually
- Enter your starting location, destination, budget range, travel dates, and interests in the sidebar.
- Click the "Generate Itinerary" button.
- The application will display a map with your starting and destination points, followed by a personalized travel itinerary.