Skip to content

Commit

Permalink
update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
lukas-blecher committed May 18, 2022
1 parent 174403a commit cac7f3a
Show file tree
Hide file tree
Showing 10 changed files with 170 additions and 128 deletions.
7 changes: 1 addition & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,7 @@
autoclass_content = 'both'
# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'alabaster'

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ['_static']
13 changes: 7 additions & 6 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,17 @@
Welcome to LaTeX-OCR's documentation!
=====================================

.. |ico| image:: https://img.shields.io/badge/LaTeX--OCR-visit-a?style=social&logo=github
:target: https://github.com/lukas-blecher/LaTeX-OCR
This is the documentation for LaTeX-OCR |ico|. The goal of this project is to find a corresponding LaTeX code for a given image of an equation.


.. toctree::
:maxdepth: 2
:caption: Contents:

pix2tex.cli
pix2tex.gui
pix2tex.api
pix2tex.dataset
pix2tex.models
pix2tex.utils
installation
pix2tex


Indices and tables
Expand Down
39 changes: 39 additions & 0 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Installation
============

Python package
--------------

To run the model you need Python 3.7+

If you don't have PyTorch installed. Follow their instructions [here](https://pytorch.org/get-started/locally/).

Install the package `pix2tex`:

```
pip install pix2tex[gui]
```

Model checkpoints will be downloaded automatically when first running the script.

To install
- with GUI dependencies use tag `[gui]`.
- with training dependencies use tag `[train]`.
- with api dependencies use tag `[api]`.
- all dependencies use tag `[all]`.

Docker
------

The API can be used from a docker container, available on [DockerHub](https://hub.docker.com/r/lukasblecher/pix2tex)
```
docker pull lukasblecher/pix2tex:api
docker run -p 8502:8502 lukasblecher/pix2tex:api
```
This starts the API which is available at port 8502.

To use the [Streamlit](https://streamlit.io/) demo run instead
```
docker run -it -p 8501:8501 --entrypoint python lukasblecher/pix2tex:api pix2tex/api/run.py
```
and navigate to [http://localhost:8501/](http://localhost:8501/)
22 changes: 0 additions & 22 deletions docs/pix2tex.api.rst

This file was deleted.

9 changes: 0 additions & 9 deletions docs/pix2tex.cli.rst

This file was deleted.

61 changes: 0 additions & 61 deletions docs/pix2tex.dataset.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/pix2tex.gui.rst

This file was deleted.

7 changes: 0 additions & 7 deletions docs/pix2tex.models.rst

This file was deleted.

123 changes: 123 additions & 0 deletions docs/pix2tex.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
pix2tex
=======

pix2tex.cli package
-------------------

.. automodule:: pix2tex.cli
:members:
:no-undoc-members:
:show-inheritance:


pix2tex.gui package
-------------------

.. automodule:: pix2tex.gui
:members:
:no-undoc-members:
:show-inheritance:

pix2tex.api package
-------------------

Submodules
~~~~~~~~~~

pix2tex.api.app module
~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: pix2tex.api.app
:members:
:no-undoc-members:
:show-inheritance:


pix2tex.api.streamlit module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: pix2tex.api.streamlit
:members:
:no-undoc-members:
:show-inheritance:

pix2tex.dataset package
-----------------------

Submodules
~~~~~~~~~~

pix2tex.dataset.arxiv module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: pix2tex.dataset.arxiv
:members:
:no-undoc-members:
:show-inheritance:

pix2tex.dataset.dataset module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: pix2tex.dataset.dataset
:members:
:no-undoc-members:
:show-inheritance:

pix2tex.dataset.demacro module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: pix2tex.dataset.demacro
:members:
:no-undoc-members:
:show-inheritance:

pix2tex.dataset.extract\_latex module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: pix2tex.dataset.extract_latex
:members:
:no-undoc-members:
:show-inheritance:

pix2tex.dataset.latex2png module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: pix2tex.dataset.latex2png
:members:
:no-undoc-members:
:show-inheritance:

pix2tex.dataset.render module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: pix2tex.dataset.render
:members:
:no-undoc-members:
:show-inheritance:

pix2tex.dataset.scraping module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: pix2tex.dataset.scraping
:members:
:no-undoc-members:
:show-inheritance:

pix2tex.models package
----------------------

.. automodule:: pix2tex.models
:members:
:no-undoc-members:
:show-inheritance:

pix2tex.utils package
---------------------

pix2tex.utils.utils module
~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: pix2tex.utils.utils
:members:
:no-undoc-members:
:show-inheritance:
10 changes: 0 additions & 10 deletions docs/pix2tex.utils.rst

This file was deleted.

0 comments on commit cac7f3a

Please sign in to comment.