https://github.com/a-mhamdi/snap2typst
Equation parser and bibliography fetcher using ollama
https://github.com/a-mhamdi/snap2typst
ollama streamlit typst
Last synced: 4 months ago
JSON representation
Equation parser and bibliography fetcher using ollama
- Host: GitHub
- URL: https://github.com/a-mhamdi/snap2typst
- Owner: a-mhamdi
- License: mit
- Created: 2024-12-08T20:15:01.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-12-22T20:21:46.000Z (over 1 year ago)
- Last Synced: 2025-04-30T05:33:58.583Z (about 1 year ago)
- Topics: ollama, streamlit, typst
- Language: Python
- Homepage: https://snap2typst.streamlit.app/
- Size: 9.31 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SNAP To `TYPST`

This repository contains a web application that allows users to upload an image of an equation and receive the corresponding `Typst` code. Additionally, users can input a URL to obtain the Hayagriva `YAML`-formatted bibliography reference compatible with `Typst`.
## Features
1. **Equation Parser**: Upload an image containing an equation, and the application will parse it and generate the corresponding `Typst` code.
1. **URL Bibliography Fetcher**: Input a URL, and the application will fetch and display metadata such as the author, title, and publication name in `YAML` format compatible with `Typst`.
## Project Structure
- `app.py`: The main application file;
- `bib.txt`: contains the guidelines for bibliographic metadata retrieval;
- `eq.txt`: contains the guidelines for equation parsing;
- `.streamlit/config.toml`: Configuration file for Streamlit.
## Installation
To install the required dependencies, run:
```zsh
uv pip install -r requirements.txt
```
You need to install the `ollama` CLI to run the application. To install the CLI, run:
```zsh
curl -fsSL https://ollama.com/install.sh | sh
```
`llama3.2-vision` is required to run the application:
```zsh
ollama run llama3.2-vision
```
## Usage
To start the application, run:
```zsh
streamlit run app.py
```
## DEMO

## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.