hasibzunair commited on
Commit
032a15a
Β·
1 Parent(s): f83e60a
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -16,7 +16,7 @@ def inference(input_image_path):
16
  img = Image.open(input_image_path)
17
  output = model(img)
18
  print("Model output:",output)
19
- return output
20
 
21
 
22
  # Front end
@@ -26,7 +26,7 @@ article = "<p style='text-align: center'><a href='https://lukas-blecher.github.i
26
 
27
 
28
  # UI
29
- gr.Interface(
30
  inference,
31
  title=title,
32
  description=description,
@@ -34,6 +34,6 @@ gr.Interface(
34
  inputs=gr.inputs.Image(type="filepath", label="Input: Image of your equation you want to covert."),
35
  outputs=gr.outputs.Textbox(type="text", label="Output: Converted LaTeX code."),
36
  examples=["./eqn1.png", "./eqn2.png", "./eqn3.png"],
37
- allow_flagging="never",
38
- analytics_enabled=False,
39
- ).launch()
 
16
  img = Image.open(input_image_path)
17
  output = model(img)
18
  print("Model output:",output)
19
+ return input_image_path
20
 
21
 
22
  # Front end
 
26
 
27
 
28
  # UI
29
+ demo = gr.Interface(
30
  inference,
31
  title=title,
32
  description=description,
 
34
  inputs=gr.inputs.Image(type="filepath", label="Input: Image of your equation you want to covert."),
35
  outputs=gr.outputs.Textbox(type="text", label="Output: Converted LaTeX code."),
36
  examples=["./eqn1.png", "./eqn2.png", "./eqn3.png"],
37
+ )
38
+
39
+ demo.launch()