- Introduction
- Technologies Used
- What is Flask?
- Project Overview
- How to Create Google API?
- Installation
- Usage Code
- Contribution
This Flask-based chat application is being developed with utilizing HTML, CSS, and JS. This project encompasses Gemini, an AI-powered conversational chatbot.
Flask is a Python-based web application development framework. Known for its minimalist and flexible nature, it's used for creating web applications and APIs. While providing core functionality, it accommodates various needs through an extensive extension system. It offers basic features like routing, handling HTTP requests, template support, and is often preferred for quickly prototyping or developing mid-sized projects.
The folders in the project are as follows:
- .env: This file contain Gemini API KEY and SECRET KEY. You have to configure those keys.
- static: Contains CSS and JavaScript codes along with various icons and images.
- templates: Stores HTML code necessary for deploying the Flask application.
- requirements.txt: It has some dependencies libraries for installation.
The file contains route codes provided by the Flask framework. When the site is deployed, the route directions within the app.py file operate based on actions on the site, directing the flow of the site accordingly.
The file contains send-mail route codes. It provided to send mail with SMTP server and work on contact page with base configurations.
To utilize Google Gemini Pro, click here to obtain your Google API Key and proceed with the steps.
-
Python 3.8+ is required to run this project.
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
- Windows:
venv\Scripts\activate
- Unix or MacOS:
source venv/bin/activate
- Windows:
-
Create a
.env
file and add required environmental variables:GOOGLE_API_KEY="YOUR_GOOGLE_API_KEY" SECRET_KEY="YOUR_SECRET_KEY"
-
Clone this repository to your local machine using Git:
git clone https://github.com/ahmetdzdrr/gemini-pro-chatbot.git
-
Install the required Python libraries by running:
pip install -r requirements.txt
/home
- Loads the homepage./about
- Loads the about page./contact
- Loads the contact page./gemini
- Loads a page for using gemini pro model./send-mail
- It's automatically send an email from contact page.
To run the project, follow these steps:
Open your terminal or command prompt.
Navigate to the directory where the project files are located.
Enter the following command:
python app.py
Your contributions are welcome! If you wish to contribute, feel free to open a pull request. Please make sure to explain your changes.