Skip to content

Latest commit

 

History

History
65 lines (47 loc) · 1.55 KB

File metadata and controls

65 lines (47 loc) · 1.55 KB

Flask Chatbot with Gemini and Weather Integration

A Flask-based chatbot that uses Google's Gemini AI for conversations and OpenWeather API for weather information. It also supports file uploads and querying document contents.

Features

  • Chat with Gemini AI
  • Get weather information for any city
  • Upload and query documents (supports PDF)
  • Web interface with multiple themes

Setup

  1. Clone the repository
git clone <your-repo-url>
cd CHATBOT
  1. Create a virtual environment and activate it
python -m venv env
# On Windows
env\Scripts\activate
# On Unix or MacOS
source env/bin/activate
  1. Install dependencies
pip install -r requirements.txt
  1. Set up environment variables

  2. Run the application

python chatbot_flask.py

The application will be available at http://localhost:5000

Environment Variables

Create a .env file in the root directory with the following variables:

GEMINI_API_KEY=your_gemini_api_key_here
OPENWEATHER_KEY=your_openweather_api_key_here

Project Structure

  • chatbot_flask.py: Main Flask application
  • static/: Static files (images, styles)
  • templates/: HTML templates
  • uploaded_files/: Directory for uploaded documents
  • requirements.txt: Project dependencies