Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alpayariyak/transcriptassist
https://github.com/alpayariyak/transcriptassist
Last synced: 18 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/alpayariyak/transcriptassist
- Owner: alpayariyak
- Created: 2023-08-03T05:20:44.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-08-03T07:54:16.000Z (over 1 year ago)
- Last Synced: 2024-10-29T12:37:53.476Z (2 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# TranscriptAssist
TranscriptAssist is a powerful system that combines Google Cloud Vision API, Mathpix OCR API, and OpenAI's GPT-4 to transcribe images of handwritten math into LaTeX.The main purpose of the creation of TranscriptAssist was to accelerate internal tagging and labeling of handwritten math data at EdLight, PBC.
# Installation
```bash
pip install -r requirements.txt
```# Setup
### Add credentials to .env file in root directory of project
```bash
# MathPix
MATHPIX_APP_KEY=""
MATHPIX_APP_ID=""
# Google Cloud Vision
GOOGLE_CLOUD_API_KEY=""
GOOGLE_CLOUD_APP_ID=""
# OpenAI
OPENAI_API_KEY=""
```# Usage
### 1. Import TranscriptAssist
```python
from transcriptassist.transcriptassist import TranscriptAssist
```
### 2. Initialize a TranscriptAssist object
- **temperature** (float):
- The temperature to use for the GPT model.
- default: 0.3
```python
ta = TranscriptAssist(temperature)
```### 3. Transcribe an image
- **link_or_path** (str):
- The link or path of the image to transcribe.
- **crop_coordinates** (tuple):
- The coordinates to crop the image to.
- format: (x1, y1, x2, y2)
- default: None
- **use_gcv** (bool):
- Whether to use Google Cloud Vision API.
- default: True
- **use_mathpix** (bool):
- Whether to use Mathpix API.
- default: True```python
ta.transcribe(link_or_path, crop_coordinates, use_gcv, use_mathpix)
```