Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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,
|