This is the demo page of ใCDGP: Automatic Cloze Distractor Generation based on Pre-trained Language Modelใ
- Open the demo page.
- Please enter an article or select an example.
- Click Confirm.
- Highlight some words to be masked.
- Click Generate.
- Wait a second, then a stem, options and answers will show up below.
- You can copy the result or download the text or json file.
- Path
https://cdgp-demo.nlpnchu.org/api/
- Request
POST {
stem: <an article with masked word>
}
- Response (CORS)
JSON {
stem: <an article with blanks>,
options: [
{
answer: <answer>,
distractors: [<distractor1>, <distractor2>, <distractor3>],
},
...
]
}
- Pull image from Docker Hub to your device.
docker pull nchunlplab/cdgp-demo:latest
- Copy
docker-compose.yml
to your current working directory.
version: "3.9"
services:
cdgp-demo:
image: nchunlplab/cdgp-demo:latest
container_name: cdgp-demo
build: .
ports:
- "<YOUR PORT>:5000"
restart: always
- Run docker-compose.
docker-compose up # front
docker-compose up -d # backgrond
- If you want to stop container, please use two commands below.
docker stop cdgp-demo
docker rm cdgp-demo
- Andy Chiang (@AndyChiangSH)