AI Travel Chatbot in Python is a Streamlit-based AI travel assistant that combines Google Gemini Generative AI, Wikipedia and Google Maps to provide city information and travel recommendations. Users can search for a city and receive famous places, local foods, malls and restaurants with direct Google Maps links.
AI Travel Chatbot in Python is an interactive travel assistant developed using Python and Streamlit. The application combines Google Gemini Generative AI, Wikipedia and Google Maps search links to help users explore information about different cities from a single interface.
Users simply enter a city name and request travel information. The application retrieves a short city description from Wikipedia and uses Google Gemini to generate recommendations for famous places, local foods, malls and restaurants.
Users can enter the name of any city into the Streamlit search field. The selected city becomes the basis for retrieving the city description and generating travel recommendations.
The application uses the Wikipedia Python library to retrieve a short description of the selected city. The system attempts to generate a four-sentence summary and includes handling for Wikipedia disambiguation results.
Google Gemini Generative AI generates travel recommendations based on the selected city. The application requests three famous places, three popular local foods, three known malls and three recommended restaurants.
The chatbot displays up to three famous places to visit in the selected city. Each recommendation can be opened directly through a Google Maps search link.
The application displays up to three popular local foods associated with the selected destination, helping users discover regional food options.
Users can view up to three known malls recommended for the selected city. Each recommendation includes a Google Maps search option.
The chatbot displays up to three recommended restaurants generated by Gemini AI for the selected destination.
The application automatically creates Google Maps search URLs for recommended places, malls and restaurants. Users can open these links to continue exploring the selected location on Google Maps.
In addition to individual recommendations, the application provides a Google Maps link for exploring the complete city.
The project includes custom HTML and CSS styling to improve the default Streamlit interface. Styled headings, travel sections, recommendation items, descriptions and map links create a cleaner travel-oriented experience.
The application handles situations where a city description cannot be retrieved, Gemini returns an error or the generated AI response cannot be parsed correctly.
The project uses Python URL parsing functionality to safely create Google Maps search links based on the recommended location and city.
The project does not require a database. Travel information is retrieved through Wikipedia and Gemini, while Google Maps search URLs are generated dynamically.
Watch AI Travel Chatbot in Python Demo
1. Install Python 3.x and Visual Studio Code. 2. Extract the AI Travel Chatbot project ZIP file. 3. Open the project folder in Visual Studio Code. 4. Open the VS Code terminal. 5. Create a virtual environment using: python -m venv venv 6. Activate the virtual environment on Windows using: venv\Scripts\activate 7. Install the required packages using: pip install streamlit wikipedia google-generativeai 8. Configure your Google Gemini API key in the project. 9. Set the Gemini API key using the project's configuration: genai.configure(api_key="YOUR_GEMINI_API_KEY") 10. Save the API key configuration. 11. Start the application using: streamlit run app.py 12. Open the Streamlit URL displayed in the terminal. 13. Enter the name of a city in the city search field. 14. Click the Get Travel Info button. 15. Review the Wikipedia city description. 16. Review AI-generated famous places, local foods, malls and restaurants. 17. Click the Google Maps links to explore recommended locations. 18. Use the complete city Google Maps link to explore the destination.
FAQ for this project coming soon.
No reviews yet. Be the first to review!