jadechoghari commited on
Commit
3666985
1 Parent(s): 8fa6ab2

update app.py

Browse files
__pycache__/utils.cpython-310.pyc ADDED
Binary file (14.3 kB). View file
 
app.py CHANGED
@@ -6,7 +6,7 @@ import torch
6
  from PIL import Image
7
  import io
8
 
9
-
10
  import base64, os
11
  from utils import check_ocr_box, get_yolo_model, get_caption_model_processor, get_som_labeled_img
12
  import torch
@@ -53,8 +53,9 @@ OmniParser is a screen parsing tool to convert general GUI screen to structured
53
  DEVICE = torch.device('cuda')
54
 
55
  # @spaces.GPU
56
- # @torch.inference_mode()
57
- # @torch.autocast(device_type="cuda", dtype=torch.bfloat16)
 
58
  def process(
59
  image_input,
60
  box_threshold,
 
6
  from PIL import Image
7
  import io
8
 
9
+ import spaces
10
  import base64, os
11
  from utils import check_ocr_box, get_yolo_model, get_caption_model_processor, get_som_labeled_img
12
  import torch
 
53
  DEVICE = torch.device('cuda')
54
 
55
  # @spaces.GPU
56
+ @torch.inference_mode()
57
+ @torch.autocast(device_type="cuda", dtype=torch.bfloat16)
58
+ @spaces.GPU
59
  def process(
60
  image_input,
61
  box_threshold,
weights/icon_detect/best.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:929baa2512022543b67485143ca20a2d556183043bd7ec9fff642b62ebf7723e
3
+ size 12224434