-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
45 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,71 +1,68 @@ | ||
# EduAid: AI Quiz Generation🚀 | ||
Online learning has taken the front seat in the post pandemic age. With the advent of sophisticated AI architectures like the Transformers, it is but natural that AI would find its way into education. Learning online via YouTube or MOOC platforms is often done as a method of self learning. The biggest obstacle faced by a student in self learning is the lack of attention span. An online tool that can generate short quizzes on input educational content can be of great use to teachers and students alike as it can help retain important information, frame questions and quickly revise large chunks of content. | ||
# EduAid: AI Quiz Generation 🚀 | ||
|
||
EduAid is one such project which is currently available in the form of a browser extension. | ||
Online learning has taken the front seat in the post-pandemic age. With the advent of sophisticated AI architectures like Transformers, it is only natural that AI would find its way into education. Learning online via platforms like YouTube or MOOCs is often a method of self-learning. The biggest obstacle faced by students in self-learning is the lack of attention span. An online tool that can generate short quizzes from input educational content can be a great resource for both teachers and students. It helps retain important information, frame questions, and quickly revise large chunks of content. | ||
|
||
## Installation | ||
EduAid is one such project currently available in the form of a browser extension. | ||
|
||
Currently, the extension is not deployed, so it can only run locally. To run the extension locally, clone the github repo using: | ||
## Installation and Setup | ||
|
||
### 1. Clone the Repository | ||
|
||
``` | ||
```bash | ||
git clone https://github.com/AOSSIE-Org/EduAid.git | ||
cd EduAid | ||
``` | ||
|
||
Now move to the `backend` directory and make a new directory that will store the models. | ||
|
||
### 2. Backend Setup | ||
- Download the Sense2Vec model from [this link](https://github.com/explosion/sense2vec/releases/download/v1.0.0/s2v_reddit_2015_md.tar.gz) and extract the contents into the `backend` folder. | ||
- Extract the contents of the downloaded compressed folder inside the backend folder. | ||
|
||
- Install Python Dependencies | ||
Navigate to the root repository folder and run the following command to install the required Python dependencies: | ||
```bash | ||
pip install -r requirements.txt | ||
``` | ||
cd backend && mkdir models && cd models && mkdir modelA && mkdir modelB | ||
- Run Flask App | ||
Navigate to the backend folder and start the Flask app: | ||
```bash | ||
python server.py | ||
``` | ||
This will activate the backend for the application. | ||
|
||
Download the model files from 🤗 Hub: [model A](https://huggingface.co/prarabdhshukla/fine-tuned-t5-keyphrase-detection) [model B](https://huggingface.co/prarabdhshukla/fine-tuned-t5-answer-aware-question-generation/tree/main) and place them in the respective folders. | ||
|
||
Finally, the `models` should look like this: | ||
### 3. Configure Google APIs | ||
|
||
``` | ||
+---models | ||
ª +---modelA | ||
ª ª config.json | ||
ª ª generation_config.json | ||
ª ª pytorch_model.bin | ||
ª ª | ||
ª +---modelB | ||
ª config.json | ||
ª generation_config.json | ||
ª pytorch_model.bin | ||
``` | ||
#### Google Docs API | ||
|
||
Now run the script `server.py` | ||
1. Navigate to the `backend` folder. | ||
2. Open the `service_account_key.json` file. | ||
3. Enter the service account details for the Google Docs API. | ||
4. Refer to the [Google Docs API documentation](https://developers.google.com/docs/api/reference/rest) for more details. | ||
|
||
``` | ||
cd .. && python3 server.py | ||
``` | ||
#### Google Forms API | ||
|
||
Now go the extensions page of your browser and load the directory `EduAid/extension` and you're ready to roll! | ||
1. Open the `credentials.json` file in the `backend` folder. | ||
2. Enter the necessary credentials for the Google Forms API. | ||
3. Refer to the [Google Forms API quickstart guide](https://developers.google.com/forms/api/quickstart/python#set_up_your_environment) for setup instructions. | ||
|
||
To load an unpacked directory as an extension in a browser, you might have to turn on *Developer mode* on your browser. | ||
### 4. Extension Setup | ||
|
||
**Note:** This extension was tested on Google Chrome and Brave. The instructions on how to run it on Chrome can be found [here](https://developer.chrome.com/docs/extensions/mv3/getstarted/development-basics/). For Brave, the steps are the same with minor differences. | ||
#### Install Dependencies | ||
|
||
## How to use | ||
Navigate to the `extension` folder and install the required dependencies: | ||
|
||
After opening the extension and clicking on the 'Fire up!' button, we currently have support for two methods of accepting input: | ||
|
||
1. Typing out the text or by pasting from the clipboard | ||
2. By uploading a PDF | ||
|
||
Then after clicking the next button, the questions are generated, which can either be viewed in the extension popup itself or can be downloaded as a `.txt` file. | ||
|
||
![eduaid-demo](./readme-assets/EduAid-demo.gif) | ||
|
||
**Note:** If your machine has GPU, the inference time should be faster. On CPU, it can take from a few seconds to a few minutes for inference. On an AMD RYZEN 5 8GB CPU with 6 cores, the inference time is usually 45-70 seconds. The inference time may differ depending on the specifications of your machine. | ||
|
||
## How to contribute | ||
```bash | ||
npm install | ||
``` | ||
#### Build the Project | ||
|
||
This is the first year of the project. While some may have their own ideas on how to contribute, for the newcomers to the repository, you may follow the following steps: | ||
Build the extension: | ||
|
||
1. First get to know the organization and the project by visiting the [Official Website](http://aossie.gitlab.io/) | ||
```bash | ||
npm run build | ||
``` | ||
#### Load the Extension in Chrome | ||
|
||
2. Visit the [Discord Channel](https://discord.com/channels/1022871757289422898/1073262393670504589) for interacting with the community! | ||
1. Open Chrome and navigate to `chrome://extensions/`. | ||
2. Enable "Developer mode" (top-right corner). | ||
3. Click on "Load Unpacked" and select the `dist` folder created in the previous step. | ||
|
||
|