This is a Flask based web application that allows users to sign up, log in, and interact with content generated by the Google Generative AI model, Gemini 1.5 Pro. The application includes user authentication using Flask-Login, password hashing with Flask-Bcrypt, and data storage with SQLite.
- User registration and login
- Password hashing for security
- Integration with Google Generative AI to generate and validate content-based questions
- Generation of Flash cards for easy revision of important things made using Google Genarative AI
- Simple SQLite database for user data
- Python 3.x
- Flask
- Flask-SQLAlchemy
- Flask-Bcrypt
- Flask-Login
- python-dotenv
- google-generativeai
-
Clone the repository:
git clone https://github.com/vipulsingh04/sc1.git cd your-repository
2.Create a virtual environment:
python -m venv venv
3.Activate the virtual environment:
On Windows:
venv\Scripts\activate
On macOS and Linux:
source venv/bin/activate
4.Install the required packages:
pip install -r requirements.txt
5.Create a .env file in the root of your project to store sensitive information like API keys. Your .env file should look like this:*
SECRET_KEY=your_secret_key GOOGLE_API_KEY=your_google_api_key
1.Initialize the database:
Before running the application for the first time, you need to create the database:
python:
>>> from your_application import db
>>> db.create_all()
>>> exit()
Alternatively, if you're running the app for the first time, the database will be initialized automatically.
2.Run the Flask application:
flask run
or
python your_application.py
Open your web browser and go to http://127.0.0.1:5000.
/project-root │ ├── .env # Environment variables ├── .gitignore # Git ignore file ├── README.md # Project documentation ├── requirements.txt # Python dependencies ├── your_application.py # Main Flask application file ├── /templates # HTML templates for the Flask app │ ├── index.html │ ├── login.html │ ├── signup.html │ └── ques.html └── /static # Static files (CSS, JS, images) ├── css/ ├── js/ └── images/
This project is licensed under the MIT License. See the LICENSE file for more information.