Skip to content

A simple tool for recognizing chemical structure images as mol files based on OSRA packaging.

Notifications You must be signed in to change notification settings

felixnextx/mlocr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mlocr

mlocr is a simple tool for recognizing chemical structure images and converting them to mol files, based on OSRA.

Usage

1. Using Python

Clone the repository and navigate to the project folder:

git clone [email protected]:felixnextx/mlocr.git
cd mlocr

Install Flask:

pip install flask

Run the application:

python app.py

You should see output like this:

* Running on all addresses (0.0.0.0)
* Running on http://127.0.0.1:5001

2. Using Docker

Build the Docker image:

docker build -t mlocr:v1.0 .

Run the Docker container:

docker run -p 5000:5000 mlocr:v1.0

You can access the tool via Docker at http://localhost:5000.

3. API Usage

You can send a POST request to convert a base64-encoded image of a chemical structure to a mol file using the /base64img2mol endpoint.

Example using curl:

curl --location 'http://127.0.0.1:5000/base64img2mol' \
--header 'Content-Type: application/json' \
--data '{
    "img": "base64code"
}'

In the img field, replace "base64code" with your actual base64-encoded image of the chemical structure.

About

A simple tool for recognizing chemical structure images as mol files based on OSRA packaging.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published