GithubHelp home page GithubHelp logo

nokchalatte / langcaptcha Goto Github PK

View Code? Open in Web Editor NEW

This project forked from akotet08/langcaptcha

0.0 0.0 0.0 1.3 MB

JavaScript 1.54% Python 79.96% CSS 6.29% HTML 0.84% Vue 10.73% Dockerfile 0.63%

langcaptcha's Introduction

LangCaptcha

How to run the backend and DB server

  1. In order to use the COMET model in the backend, you first need to download the model. Use the function

    cd utils && python convert_to_onnx.py

    The downloading process is going to take a while. When it's done, copy or move the CONVERTED_COMET folder to $PROJECT_ROOT/backend/app.

  2. Spin up a Postgres database and the backend in containers. From the project root directory, run:

    cd backend && docker compose up  # use the --build flag if this is your first time spinning up the project

    Note: make sure that you don't have any other Postgres running in the same port. You can check it by

    lsof -i:5432  # or any other port where you are running the containerized Postgres DB
  3. Make sure that the containers are running using

    docker ps

    If this is the first time you set up the environment, (in a new terminal) save the authentication data into the database by running

    cd ../utils
    python preprocess_first_text.py

    This will create the data table first in the database and populate it with English-Korean parallel corpus data. The table will look like

    id en ko
    1 text in text in
    2 english korean

    To set up the second part of the verification, run

    python setup_second.py

    This will create the prompt pool data prompt and populate it with three sample prompts.

    id text
    1 I cannot find my umbrella.
    2 Where is the organizer of this event
    3 There should be a policy that limits the number of visitors in the school per day.

    It will also create a table to store the translations submitted in the second part, second.

    id prompt_id translation

    In order to check if the tables are created, you can enter the container using the command

    docker exec -it <postgres-container-id> psql -U postgres -d bytes
  4. In order to run the frontend, in another terminal, type in the command

    npm run dev  # make sure that node is installed

    and open the website using the address mentioned in the terminal.

langcaptcha's People

Contributors

nokchalatte avatar akotet08 avatar biniyamaschalew avatar lwamzeche avatar stdeguzman 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.