Skip to content

Instantly share code, notes, and snippets.

@marvinvista
marvinvista / mathpix2gpt.py
Last active April 29, 2023 23:08 — forked from danielgross/mathpix2gpt.py
A version of Daniel Gross' mathpix2gpt.py that anyone can run on Replit.
import os
import sys
import time
import requests
import openai
import tiktoken
from termcolor import colored
openai.api_key = os.getenv('OPENAI_API_KEY')
USE_GPT_4_32K = True
@danielgross
danielgross / mathpix2gpt.py
Last active April 22, 2024 05:19
mathpix2gpt.py
import requests
import time
import os
import sys
import openai
import tiktoken
from termcolor import colored
openai.api_key = open(os.path.expanduser('~/.openai')).read().strip()