Zaker237 / bert-text-similatiry-api-server

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Text Similarity API

this repository contains a small web server with an API to calculate the similarity between a text and a list of texts. The server is build using FastApi and sentence-transformers librairie from huggingface.

NB: The Languages of the text should be English.

I build this to integrate it the This project.

REQUIREMENTS

  • python >=3.6
  • docker

How to run ?

Create a venv folder:

$ python3 -m venv venv

Activate the venv:

$ source venv/bin/activate

Install requirements:

$ pip install -r requirements.txt

Run the server:

$ uvicorn similarity.main:app --reload --host 0.0.0.0 --port 8002

The server shoul start on the port 8002 and the api documentation should available Hier.

Don't forget to deactivate the venv when you're done:

$ deactivate

About


Languages

Language:Python 86.8%Language:Dockerfile 13.2%