SWHL commited on
Commit
82111ca
1 Parent(s): f42b187

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -9,7 +9,7 @@ import pandas as pd
9
  import pypdfium2
10
  import streamlit as st
11
  from PIL import Image
12
- from rapid_latex_ocr import LatexOCR
13
  from streamlit_drawable_canvas import st_canvas
14
 
15
  MAX_WIDTH = 800
@@ -20,7 +20,7 @@ st.set_page_config(layout="wide")
20
 
21
  @st.cache_resource()
22
  def load_model_cached():
23
- return LatexOCR()
24
 
25
 
26
  def get_canvas_hash(pil_image):
@@ -74,7 +74,7 @@ def get_image_size(pil_image):
74
 
75
  if __name__ == "__main__":
76
  st.markdown(
77
- "<h1 style='text-align: center;'><a href='https://github.com/RapidAI/RapidLatexOCR' style='text-decoration: none'>Rapid ⚡︎ LaTeX OCR</a></h1>",
78
  unsafe_allow_html=True,
79
  )
80
  st.markdown(
@@ -86,7 +86,7 @@ if __name__ == "__main__":
86
  <a href="https://pypi.org/project/rapid_latex_ocr/"><img alt="PyPI" src="https://img.shields.io/pypi/v/rapid_latex_ocr"></a>
87
  <a href="https://semver.org/"><img alt="SemVer2.0" src="https://img.shields.io/badge/SemVer-2.0-brightgreen"></a>
88
  <a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
89
- <a href="https://github.com/RapidAI/RapidLatexOCR"><img src="https://img.shields.io/badge/Github-link-brightgreen.svg"></a>
90
  </p>
91
  """,
92
  unsafe_allow_html=True,
 
9
  import pypdfium2
10
  import streamlit as st
11
  from PIL import Image
12
+ from rapid_latex_ocr import LaTeXOCR
13
  from streamlit_drawable_canvas import st_canvas
14
 
15
  MAX_WIDTH = 800
 
20
 
21
  @st.cache_resource()
22
  def load_model_cached():
23
+ return LaTeXOCR()
24
 
25
 
26
  def get_canvas_hash(pil_image):
 
74
 
75
  if __name__ == "__main__":
76
  st.markdown(
77
+ "<h1 style='text-align: center;'><a href='https://github.com/RapidAI/RapidLaTeXOCR' style='text-decoration: none'>Rapid ⚡︎ LaTeX OCR</a></h1>",
78
  unsafe_allow_html=True,
79
  )
80
  st.markdown(
 
86
  <a href="https://pypi.org/project/rapid_latex_ocr/"><img alt="PyPI" src="https://img.shields.io/pypi/v/rapid_latex_ocr"></a>
87
  <a href="https://semver.org/"><img alt="SemVer2.0" src="https://img.shields.io/badge/SemVer-2.0-brightgreen"></a>
88
  <a href="https://github.com/psf/black"><img src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
89
+ <a href="https://github.com/RapidAI/RapidLaTeXOCR"><img src="https://img.shields.io/badge/Github-link-brightgreen.svg"></a>
90
  </p>
91
  """,
92
  unsafe_allow_html=True,