Skip to content

danaiamirali/spec-to-tex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spec-to-tex (WIP)

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.

Usage

python3 -m spec_to_tex {path-to-file-to-convert} {command-line args}

The command line args are as follows:

  • mode: takes one of openai, llama, structure. Currently only openai is implemented; selecting openai will lead to the program using GPT4V to perform the conversion. llama will use LlamaParse and structure 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

About

Generate LaTeX templates from your PDFs.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages