Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Amr-YA authored Aug 2, 2022
1 parent bf6389d commit 333975c
Showing 1 changed file with 17 additions and 11 deletions.
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# language_detector
# Language Detector

Language detector trained with 12 languages, takes in a text and return the language through API

Expand All @@ -16,18 +16,24 @@ The languages:
- Turkish: tu
- Arabic: ar

## Building the docker
docker build -t language_detector:latest .
## Installation
### Building with docker
build the project using docker, and give it a tag "language_detector"
`docker build -t language_detector:latest .`

## Run docker
docker run -p 5005:5005 language_detector:latest
### Run with docker
tun the image built previously using the tage "language_detector"
`docker run -p 5005:5005 language_detector:latest`

## API Post
requests.post("http://localhost:5005/predict",
json={"sender": "amr", "message': "text"})
## Usage
### API Post
send a text to the model using:
`requests.post("http://localhost:5005/predict",
json={"sender": "amr", "message': "text"})`

## API Response
{
### API Response
the reply of the post request containing the detected language
`{
"sender": sender,
"lang": language
}
}`

0 comments on commit 333975c

Please sign in to comment.