Bumblebee2023/ml_api

Jupyter Notebook

0

62 commits

updated Aug 28, 2022

See the code

README

DocSuggestor

Наш сервис сделает всю работу за вас :)))

Сервис на данный момент работает только с документами типа .docx, будьте внимательнее если будете загружать другие документы(в таком случае вы получите ошибку 451 с сотвествующим пояснением)

Сервис поддерживает две точки входа:

REST API

Authorization:

Python request sample:

import requests

url = 'http://0.0.0.0:49154/process_the_document/'
token = ''
path_to_file = "file.docx"
f = open(path_to_file, 'rb')

resp = requests.post(url, json=f, headers={'Authorization': f'Bearer {token}'})
print(resp.__dict__)

POST /process_the_document

Это метод который принимает на вход документ и отдает результат работы сервисаю

Request

{
  "place_holder": 0
}

Arguments:

  • place_holder

Responce

{
  "place_holder": 0
}

CLI for recurring operations management

...

Installation

Pre installation requirements:

  • python >= 3.9.0

  • Set environment variable list

export AUTHORIZATION_TOKEN={set here your athorization token}
export SERVER_IP={set here your server ip}
export API_PORT={set here your ip port}

Installation:

Text search api installation:

  1. Create and activate clear python3 environment

  2. run:

pip install -r requirements/text_search_api_req.txt
  1. run:
python download.py

Setting up apis:

  • DocApi

  1. run:
python python run_api.py
  1. Add "/docs" at the end and open the link, which you can get from console

Bumblebee2023/ml_api

Jupyter Notebook

0

62 commits

updated Aug 28, 2022

See the code

README

DocSuggestor

Наш сервис сделает всю работу за вас :)))

Сервис на данный момент работает только с документами типа .docx, будьте внимательнее если будете загружать другие документы(в таком случае вы получите ошибку 451 с сотвествующим пояснением)

Сервис поддерживает две точки входа:

REST API

Authorization:

Python request sample:

import requests

url = 'http://0.0.0.0:49154/process_the_document/'
token = ''
path_to_file = "file.docx"
f = open(path_to_file, 'rb')

resp = requests.post(url, json=f, headers={'Authorization': f'Bearer {token}'})
print(resp.__dict__)

POST /process_the_document

Это метод который принимает на вход документ и отдает результат работы сервисаю

Request

{
  "place_holder": 0
}

Arguments:

  • place_holder

Responce

{
  "place_holder": 0
}

CLI for recurring operations management

...

Installation

Pre installation requirements:

  • python >= 3.9.0

  • Set environment variable list

export AUTHORIZATION_TOKEN={set here your athorization token}
export SERVER_IP={set here your server ip}
export API_PORT={set here your ip port}

Installation:

Text search api installation:

  1. Create and activate clear python3 environment

  2. run:

pip install -r requirements/text_search_api_req.txt
  1. run:
python download.py

Setting up apis:

  • DocApi

  1. run:
python python run_api.py
  1. Add "/docs" at the end and open the link, which you can get from console