This software is provided to you "as is", use at your own risk and without warranties of any kind. It is your responsibility to read and understand how latex-gen works and the implications of running this software. The usage of latex-gen involves various risks, including, but not limited to: API costs associated with OpenAI usage, potential generation of inaccurate content, and reliance on third-party AI models. No developers or entity involved will be liable for any claims and damages associated with your use, inability to use, or your interaction with other nodes or the software.
# Clone or copy the project to any machine
cd latex-gen
pip install -e . # Install dependencies
./latex-gen "Create a report" # Runlatex-gen# Generate a document
latex-gen "Create a technical report about machine learning"
# Generate and compile PDF
latex-gen "Create a report" --pdf
# Specify output file
latex-gen "Create a report" -o my_reportfrom latex_gen import generate_with_ollama, extract_latex_and_save
result = generate_with_ollama("Create a document about AI")
filename, latex_code = extract_latex_and_save(result)
print(f"Saved: {filename}")Create a .env file:
# Use Ollama (true) or OpenAI (false)
USE_OLLAMA=true
OLLAMA_MODEL=llama3.2
# OpenAI configuration (when USE_OLLAMA=false)
OPENAI_API_KEY=sk-your-key-hereMIT License - see LICENSE file