Coder Social home page Coder Social logo

ocr-chatgpt's Introduction

使用技術

目次

  1. 使用方法
  2. 実行ファイルの作成

OCR-ChatGPT

Windowsスクリーン上で、ドラッグで選択した範囲の画面からテキストを抽出し、ChatGPTに入力するアプリ。
ChatGPTに与える命令も指定することができ、翻訳から回答の作成まで状況に合わせて変更可能。
ChatGptからの出力は、ウィンドウで通知、PushBulletへのプッシュ通知、の2択から選択できる。
このアプリの最大のメリットは、画像内のテキストに対しても、スクリーン上での範囲選択という簡単な操作でChatGptへのテキスト入力を行える点。
文字の抽出には、GoogleVisionApi、ChatGptへの入力出力には、OpenaiApiを使用。

使用イメージ
※著作者:Freepik

default.mp4

※ Wikipedia - https://en.wikipedia.org/wiki/The_Cask

使用方法

  1. OCR-GPT.pyを実行する前に、同じディレクトリ内に"iconimg.ico"と"config.json"、GoogleCloudのApiキー(.json)を配置する。
  2. OCR-GPT.pyの実行後、タスクトレイアイコンにあるSetting項目から、先程のGoogleCLoudApiキーのファイル名とOpenAIのApiキーを入力する。
  3. 入力を完了させた後、alc + C キーを同時押しで画面選択モードに切り替わるので、ドラッグで画面選択を行う。
    ※入力テキストの文字数によっては、出力までに数秒かかる場合がある。

・"push通知に切り替え"に✓を入れ、PushBulletのApiキーが入力されていた場合、PushBulletに出力され、通知ウィンドウは作成されない。
・矩形表示に✓を入れると、画面選択時に選択範囲が赤いボックスで囲われて表示される。

実行ファイルの作成

Pyinstallerを使用することで、実行ファイル(.exe)を作成することが可能。

手順

  1. Pyinsatllerのインストール (サポートはここで確認 https://pyinstaller.org/en/stable/)
    pip install pyinstaller
  2. 作業フォルダに移動し、変換を実行。
    cd C:\python_env
    pyinstaller OCR-GPT.py --onefile --noconsole --icon=iconimg.ico

distフォルダに出力された.exeファイルは、"iconimg.ico"と"config.json"、GoogleCloudのApiキー(.json)と同じディレクトリに配置。

ocr-chatgpt's People

Contributors

aburaya5123 avatar

Watchers

Kostas Georgiou avatar  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.