| import gradio as gr | |
| from PIL import Image | |
| from pix2tex.cli import LatexOCR | |
| def greet(name): | |
| return "Hello " + name + "!!" | |
| def predict(img) -> str: | |
| return model(img) | |
| model = LatexOCR() | |
| iface = gr.Interface(fn=greet, inputs="image", outputs="text") | |
| iface.launch() | |