Using GPT-4V to generate LaTeX templates for problem sets or writeups based on a homework assignment or spec.
The program is currently a CLI tool.
python3 -m spec_to_tex {path-to-file-to-convert} {command-line args}
The command line args are as follows:
mode
: takes one ofopenai
,llama
,structure
. Currently onlyopenai
is implemented; selectingopenai
will lead to the program using GPT4V to perform the conversion.llama
will use LlamaParse andstructure
will use a pipeline of OCR and Document Image Layout Transformers to programatically create the LaTeX template. Contributions would be appreciated. Ex:--mode="openai"
openai
: use to set API key for GPT4V. Ex:--openai="{key}"
verbose
: use to indicate verbosity of output. Ex:-v
clear-cache
: use to clear the cache before performing the TeX conversion. (OpenAI responses are cached to reduce API calls)
Example for using OpenAI:
python3 -m spec_to_tex documents/hw.pdf --mode="openai" --openai="apikey" --verbose