juliozhao commited on
Commit
1bcfe93
1 Parent(s): 778c8b4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -2,6 +2,7 @@ import os
2
  os.environ["GRADIO_TEMP_DIR"] = "./tmp"
3
 
4
  import sys
 
5
  import torch
6
  import torchvision
7
  import gradio as gr
@@ -28,6 +29,7 @@ id_to_names = {
28
  9: 'formula_caption'
29
  }
30
 
 
31
  def recognize_image(input_img, conf_threshold, iou_threshold):
32
  det_res = model.predict(
33
  input_img,
 
2
  os.environ["GRADIO_TEMP_DIR"] = "./tmp"
3
 
4
  import sys
5
+ import space
6
  import torch
7
  import torchvision
8
  import gradio as gr
 
29
  9: 'formula_caption'
30
  }
31
 
32
+ @spaces.GPU
33
  def recognize_image(input_img, conf_threshold, iou_threshold):
34
  det_res = model.predict(
35
  input_img,