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