![Logo](static/logo.jpeg)
The aim of this project is to generate quiz questions of MCQ or True/False type from a given text/PDF using
OpenAI models and Langchain API.
Report Bug
ยท
Request Feature
Table of Contents
In this project, we have leveraged the capabilities of OpenAI models and Langchain API to generate quiz questions of MCQ or True/False type from a given text/PDF. The project aims to automate the process of generating quiz questions, thereby saving time and effort for educators, content creators, and learners. By utilizing advanced natural language processing (NLP) models, the application can extract key information from the text and formulate relevant quiz questions based on the content.
The user can decide the number of questions to be generated, and the complexity level of the questions. The application provides a user-friendly interface that allows users to input the text or upload a PDF document, select the desired parameters, and generate quiz questions with a single click. The generated questions can be used for educational purposes, training materials, assessments, or content creation across various domains.
The application is deployed via AWS EC2 instance. That can be achieved by following the steps below:
-
Create an AWS EC2 Instance:
- Launch an EC2 instance with the desired configuration.
- Ensure that the security group associated with the instance allows inbound traffic on port 8501 (Streamlit default port).
-
SSH into the EC2 Instance:
- Use the SSH key pair associated with the EC2 instance to connect to the instance.
-
Install Required Packages:
- Install the necessary packages and dependencies on the EC2 instance.
- Ensure that Python, Streamlit, and other required libraries are installed.
- It can be done using the following commands:
sudo apt-get update
sudo apt upgrade -y
sudo apt install python3-pip git curl unzip tar make sudo vim get -y
git clone "Your-repository"
cd "Your-repository"
pip3 install -r requirements.txt
-
Initialize the OPENAI API Key:
- Set up the OpenAI API key on the EC2 instance.
- Create a
.env
file in the project directory and add the OpenAI API key. - The
.env
file should contain the following line:
OPENAI_API_KEY=your_openai_api_key
-
Run the Streamlit Application:
- Run the Streamlit application on the EC2 instance.
- Use the following command to start the Streamlit server:
python3 -m streamlit run StreamlitAPP.py
-
Access the Application:
- Access the Streamlit application by visiting the public IP address of the EC2 instance followed by port 8501.
- The application should be accessible via a web browser.
- The URL format is as follows:
http://"Your-EC2-Public-IP":8501
The application should now be up and running on the AWS EC2 instance, allowing users to generate quiz questions from text or PDF documents. The screenshots for the instance are shown below:
I'm thrilled to have you exploring my project! This endeavor is a collective effort, and we believe that every contribution adds value and creativity to our community.
How You Can Contribute:
๐ ๏ธ Found a bug? Have an idea for improvement? Fork the repo and create a pull request.
๐ก Have a suggestion for making this project even better? Open an issue with the "enhancement" tag.
โญ Like what you see? Show your support by giving our project a star!
Remember, your contributions, whether big or small, are incredibly valuable to us. They help us learn, inspire, and create a better project together.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Thank you for being a part of this journey!
Dhruv Pamneja - [email protected] / [email protected]
Project Link: https://github.com/d-pamneja/Quiz_Generator