GithubHelp home page GithubHelp logo

andychiangsh / cdgp-demo Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 21 KB

Cloze Distractor Generation - Demo

License: MIT License

Dockerfile 0.49% Python 31.17% JavaScript 43.27% CSS 1.40% HTML 23.67%

cdgp-demo's Introduction

CDGP-demo

This is the demo page of ใ€ŒCDGP: Automatic Cloze Distractor Generation based on Pre-trained Language Modelใ€

๐Ÿ’ก How to use?

Demo page

  1. Open the demo page.
  2. Please enter an article or select an example.
  3. Click Confirm.
  4. Highlight some words to be masked.
  5. Click Generate.
  6. Wait a second, then a stem, options and answers will show up below.
  7. You can copy the result or download the text or json file.

API

  • 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>],
        },
        ...
    ]
}

๐Ÿ›  How to deploy?

  1. Pull image from Docker Hub to your device.
docker pull nchunlplab/cdgp-demo:latest
  1. 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

  1. Run docker-compose.
docker-compose up        # front
docker-compose up -d     # backgrond
  1. If you want to stop container, please use two commands below.
docker stop cdgp-demo
docker rm cdgp-demo

๐Ÿ‘ฆ Authors

cdgp-demo's People

Contributors

andychiangsh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.