This project creates a web application by using a Question Generation model in PyTorch.
POST /generate-question
Parameter | Type | Description |
---|---|---|
context |
string |
Required. Text for which you want to generate questions. |
curl -X POST -d "context=i live in paris" \
http://127.0.0.1:8000/generate-question
There are three methods for setting up the application locally and running, first is using the setup script, second manually and third using docker.
- Go to root directory and give permission to script.sh to run.
chmod +x setup.sh
Run the script to install all dependencies.
./script.sh
- Activate the virtual environment
source venv/bin/activate
- Run your flask server
python app.py
Go to http://127.0.0.1:8000/ ! Your server is up.
- It is recommended that you use virtual environment for running development server. If you don't want to use it, skip to step 4 directly.
python -m pip install --user virtualenv
- If you're running the project for the first time, create a virtual environment.
virtualenv venv
- Activate the virtual environment.
source venv/bin/activate
- Install all the relevant depedencies by running this from the root directory of the project.
pip install -r requirements.txt
- Run your flask server
python app.py
Go to http://127.0.0.1:8000/ ! Your server is up.
To run tests, run the following command
python test_app.py
Client: HTML, CSS, Javascript
Server: Flask, Python