An open API service indexing awesome lists of open source software.

https://github.com/bluebirdback/ocr-by-gpt-4

Create a script using GPT-4 that can perform Optical Character Recognition (OCR).
https://github.com/bluebirdback/ocr-by-gpt-4

Last synced: over 1 year ago
JSON representation

Create a script using GPT-4 that can perform Optical Character Recognition (OCR).

Awesome Lists containing this project

README

          

# OCR Script Written by GPT-4

A Python script written by GPT-4 that can perform Optical Character Recognition (OCR) for both English and Chinese characters.

## Getting started

1. Install requirments

```shell
$ pip install requirements.txt
```

2. Install Tesseract

Please refer to https://github.com/UB-Mannheim/tesseract/wiki and https://tesseract-ocr.github.io/tessdoc/Installation.html.

Binaries are available from:

- [Ubuntu - tesseract-ocr-devel PPA](https://launchpad.net/~alex-p/+archive/ubuntu/tesseract-ocr-devel)
- [Debian - notesalexp.org](https://notesalexp.org/tesseract-ocr/#tesseract_5.x)
- [Windows - Tesseract at UB Mannheim](https://github.com/UB-Mannheim/tesseract/wiki)

3. Run the code and Enjoy

```shell
$ python ocr.py IMAGE_PATH [OUTPUT_FILE]
```

## Examples

### [Codepup 3.0 - AI Developer](https://twitter.com/SullyOmarr/status/1648444219932147717)

![Codepup 3.0](./assets/code-pup.jfif)

OCR

```
Tips :
Provide as much detaitLL as to the project goalLs as possibtle in your first message after prompting .

When continuing code,prime it with an unambiLguous snitip of code near where it cut off. ExampLe: Next from "”
{handteLogin}y />”

If CodePup tries to Leave the rest of the coding to you at any poitint,regenerate and stop it tmmediatelLy .
Then,put in your message “Continue with impLementing.."”and state the next part of the appLication to
CompLete .

To avoid issues with conversatiton token Length,get the core of the software comptLeted. Then ask for
additionatL features that are reLated. ExamptLe: "Now add user _ authentication and Login page for admin area.”
Once that is coded,go back to thits message and edit it so it requests a different bit of the rematning
functitions. This keeps the core in-memory and generates compatibtLe functions .

Use ptLain and simplLe Language after describing the project. Consider asking GPT to create deveLopment plLan
from your text .

Define MLLestones for CodePup to foLLow.
Remove the finaL 2 instructions if you don't want it's output to say CodePup .

Major changes: SsLight change of instructions,removalL of needtLess redundant words,condensed further. Now ontLy
145 tokens or 106 without “CodePup ' .
```

## Acknowledgements

- GPT-4 (ChatGPT)