git clone https://github.com/elliotkantor/quiz-generation-web.git
cd quiz-generation-web
pip install -r requirements.txt
python -m nltk.downloader punkt
git clone https://github.com/patil-suraj/question_generation.git
streamlit run main.py
A website such as localhost:8501 should pop up in your default browser. Copy text into it and watch as machine learning generates questions and answers!
-
uvicorn rest_api:app --reload
- Now navigate to the localhost site listed in the terminal. Go to that site's
/docs
page, i.e.localhost:5000/docs
to see documentation and try the methods out. - You can use this with the post method in python requests, i.e.:
import requests r = requests.post("localhost:8500", json={"text": "There are 5 apples in the box"})
- The response is in the shape of:
[ { "question": "How many apples are in the box?", "answer": "5", }, ]
The pipelines software was taken from https://github.com/patil-suraj/question_generation, as allowed by the permissive MIT license.