Skip to main content

Convert natural language descriptions to LaTeX equations

Project description

smoltex

Convert natural language descriptions to LaTeX equations within your terminal in under one second!

usage

how to use?

This project uses Groq platform for very fast response generation, so you will need to setup an API key for it. Groq provides a free tier API for personal usage.

To use smoltex you need to follow two simple steps:

Step 1: setup

  • Visit the Groq console to create your API key for free.

  • Then in the terminal of your choice, paste the below line:

export GROQ_API_KEY=<your-api-key-here>

or add this line to your .bashrc or .zshrc file for persistent usage.

Step 2: use

In the current terminal session, the command for using smoltex is smoltex followed by the natural language description of the latex equation you want:

smoltex "equation for cross entropy"

The output will be the latex string of the requested description. You can paste the equation in any latex renderer to see the result.

That's it.

available models

Using the -m or --model_name option, you can choose to generate the latex string with different models as well. Available models (as of now) are:

Llama 3 variants:
- llama3-8b-8192
- llama3-70b-8192

Gemma variants:
- gemma-7b-it
- gemma2-9b-it

Mistral variants:
- mixtral-8x7b-32768

Example command for different models:

smoltex "equation for cross entropy" -m "mixtral-8x7b-32768"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

smoltex-0.1.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

smoltex-0.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file smoltex-0.1.0.tar.gz.

File metadata

  • Download URL: smoltex-0.1.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.18

File hashes

Hashes for smoltex-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a284fd796560c50089adb1bde0728c40a52732a5d0fa14908121e124dd27c073
MD5 9a3b33140026dbadee97d5edf0fa964b
BLAKE2b-256 949f11cdfbe95a1bf1c8014891dcae3ac7402f98b7143a1edfb1f595663a0c56

See more details on using hashes here.

File details

Details for the file smoltex-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: smoltex-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.18

File hashes

Hashes for smoltex-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 973fd095e2ebc7681fd5b63523d59f42f367a7e14f841beaa7e605f55759bb6b
MD5 24c32ab21fb582b88e332ce728648122
BLAKE2b-256 bdefc197f9540d5413256073128d7d595075c20bb788c7afc221ea3138510771

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page