GithubHelp home page GithubHelp logo

comacas's Introduction

OCR Document and Booking Reservation Management

This repository contains utilities to extract Demographic information from Passport or IDs using OCR and LLM. Also, it provides some functionalities to create .txt files to upload to Allogiati-Web & Paytourist to register guests in owned B&Bs.

Installation

Python Dependencies

To use the functionalities provided in this repository, you need to install the required dependencies. You can do this by running:

pip install -r requirements.txt

LM Studio

The LLM used in this case Mistral-7B-Instruct-v0.1-GGUF is loaded in LM Studio and then the server is started locally.

OCR Document

Usage

The ocr_document module provides functionalities to process images containing text and convert them to JSON or HTML format.

Command Line Interface

You can utilize the command line interface provided by app:

python main.py id2json FILE_PATH  [--output-path <output_path>] [--save-html]
  • FILE_PATH: Path to the image file.
  • output_path: Path to save the output file. Default is "output.json" if not provided.
  • save_html: Flag to save the output as HTML. Default is False.

Example

python main.py id2json images/sample.jpg --output-path result.json

Merge TXT Files

The merge_txt_files module offers a utility to merge multiple text files into one.

Usage

python main.py merge_txt FOLDER_PATH [--output-path <output_path>]
  • FOLDER_PATH: Path to the folder containing text files to be merged.
  • output_path: Path to save the merged output. Default is "output_merged.txt" if not provided.

Example

python main.py merge_txt ./txt_files --output-path merged.txt

Booking Reservation Management

The booking_reservation module provides utilities for managing booking reservations.

Usage

JSON to TXT Conversion

python main.py json2txt JSON_FILE BOOKER [--property <property_number>] [--reservation-file <reservation_file>]
  • JSON_FILE: Path to the JSON file.
  • BOOKER: Name of the booker.
  • property: Optional property number. Default is 2 if not provided. Either 1 or 2
  • reservation_file: Path to the reservation file. If not provided, the newest file in data/booking directory will be chosen.

Example

python main.py json2txt data/document.json John_Doe --property 2 --reservation-file data/booking/reservation.xls

comacas's People

Contributors

faviasono avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.