Yiran commited on
Commit
e4d92c7
·
1 Parent(s): 5cb572e

update app.py

Browse files
Files changed (2) hide show
  1. app.py +11 -2
  2. requirements.txt +2 -0
app.py CHANGED
@@ -1,7 +1,16 @@
1
  import gradio as gr
 
 
 
2
 
3
  def greet(name):
4
  return "Hello " + name + "!!"
5
 
6
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
7
- iface.launch()
 
 
 
 
 
 
 
1
  import gradio as gr
2
+ from PIL import Image
3
+ from pix2tex.cli import LatexOCR
4
+
5
 
6
  def greet(name):
7
  return "Hello " + name + "!!"
8
 
9
+
10
+ def predict(img) -> str:
11
+ return model(img)
12
+
13
+
14
+ model = LatexOCR()
15
+ iface = gr.Interface(fn=greet, inputs="image", outputs="text")
16
+ iface.launch()
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ pix2tex==0.1.2
2
+ pillow~=9.4.0