merve HF staff commited on
Commit
c997d19
β€’
1 Parent(s): a130a5d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -7,7 +7,13 @@ from transformers import AutoProcessor, UdopForConditionalGeneration
7
  import easyocr
8
  from PIL import Image
9
  import spaces
 
10
 
 
 
 
 
 
11
  processor = AutoProcessor.from_pretrained("microsoft/udop-large", apply_ocr=False)
12
  model = UdopForConditionalGeneration.from_pretrained("microsoft/udop-large")
13
 
 
7
  import easyocr
8
  from PIL import Image
9
  import spaces
10
+ from typing import Optional, List, TypedDict, Union, Literal
11
 
12
+
13
+ class PromptValue(TypedDict):
14
+ image: Optional[Union[Image.Image, str]]
15
+ points: Optional[List[List[float]]]
16
+
17
  processor = AutoProcessor.from_pretrained("microsoft/udop-large", apply_ocr=False)
18
  model = UdopForConditionalGeneration.from_pretrained("microsoft/udop-large")
19