Skip to main content

A simple tool to extract data from data from PDFs and images using Google's gemini-2.0-flash-001 model.

Project description

Gemini Data Extractor

This tool is a prof-of-concept for extracting data from PDFs and images, using the gemini-2.0-flash-001 LLM from Google. This model attracted a lot of attention lately due to its good performances ad affordable API prices.

It uses Google's GenAI library to interact with the model and extract data from a given document using your prompt. The extracted date is returned in JSON format.

Installation

You can install the tool using pip:

pip install gemini-data-extractor

Usage

You can use the tool by running the following command:

gemini-data-extractor --path path/to/your/file.pdf --prompt "Your prompt here"

The tool will return the extracted data in JSON format to the standard output. You can also save the output to a file using the --output argument:

gemini-data-extractor --path path/to/your/file.jpg --prompt "Your prompt here" --output output.json

In case of a long prompt, you can save it to a file and pass the path to the file using the --prompt-file argument:

gemini-data-extractor --path path/to/your/file.png --prompt-file path/to/your/prompt.txt

License

This tool is licensed under the MIT license. You can find more information in the LICENSE file.

Disclaimer

Gemini is a trademark of Google LLC. This project is not affiliated with Google LLC. The tool uses the GenAI library to interact with the gemini-2.0-flash-001 LLM from Google. The tool is provided as-is and is not officially supported by Google LLC. Use it at your own risk.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gemini_data_extractor-0.1.0.tar.gz (34.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gemini_data_extractor-0.1.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file gemini_data_extractor-0.1.0.tar.gz.

File metadata

  • Download URL: gemini_data_extractor-0.1.0.tar.gz
  • Upload date:
  • Size: 34.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for gemini_data_extractor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 1fef307b19402619ef900ad1211157072065620b65776d57482980b8656a0e1a
MD5 6690f8dba2d09ad6a92e68d1fbe74fc7
BLAKE2b-256 5be0926bc9bab64cd46f0cf48694028e55ac2f37912f04d79d4091d6bb4b8cc6

See more details on using hashes here.

File details

Details for the file gemini_data_extractor-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gemini_data_extractor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c70c581ac0f5fa0101a43975709dcb48936f260ad53bc30863fb78ddd776d0e9
MD5 e1081d3ee65fa3d258f3bab8afd4c043
BLAKE2b-256 b3662de92301f29107b57d257ccaabcd67ffbed87d4e765e592cea5cc68302cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page