Skip to content

kuzgnlar/web-interface

Repository files navigation

Kuzgunlar Model Web Interface

Python 3 Dash Plotly GPL 3.0

This repo is prepared so that the Kuzgunlar Turkish NLP models can be easily used by the end users.

❗ Requirements

⚙ Setup

  • Clone or download this repo
  • Then use the following command to install the packages named in the requirements.txt file.
 python3 -m pip install -r requirements.txt

❗ IMPORTANT - Each model is ~ 450mb in size and will be downloaded automatically during initial startup. Therefore, the first run may take a long time.

  • Installation process:

animated

🎮 Usage of the Web Interface

The web interface provides a very easy to use environment for the end users to test and use the models.

  • To run the interface, all you have to do is running this command.
 python3 dash_app.py

animated

🎮 Usage of the Web API

The web API is useful when you need to work fast with big data.

  • To run the interface, all you have to do is running this command.
 python3 api.py
  • Next, you need to post a POST request to the URL of the model you want to use.
  • If you use curl for REST request:

For NER Model:

 curl http://127.0.0.1:5000/ner -H 'Content-Type: application/json' -d '{"context": "Samsun, büyükşehir statüsündeki otuz ilden biridir."}'

For the Question-Answer Model:

 curl http://127.0.0.1:5000/qa -H 'Content-Type: application/json' -d '{"context": "Mehteran birliği 1365 yılında kuruldu.", "question": "Mehteran ne zaman kuruldu?"}'

For Sentiment Analysis Model:

 curl http://127.0.0.1:5000/sentiment -H 'Content-Type: application/json' -d '{"context": "Bu ürün çok başarılı."}'
  • Usage:

animated

About

The web interface and API for Kuzgunlar Turkish NLP models

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published