Yan
commited on
Commit
·
88393ab
1
Parent(s):
4985728
added more debug prints
Browse files- handler.py +2 -0
handler.py
CHANGED
@@ -42,10 +42,12 @@ color_map = {
|
|
42 |
|
43 |
class EndpointHandler():
|
44 |
def __init__(self, path=""):
|
|
|
45 |
self.ckpt_id = "ydshieh/kosmos-2-patch14-224"
|
46 |
|
47 |
self.model = AutoModelForVision2Seq.from_pretrained(self.ckpt_id, trust_remote_code=True).to("cuda")
|
48 |
self.processor = AutoProcessor.from_pretrained(self.ckpt_id, trust_remote_code=True)
|
|
|
49 |
|
50 |
def is_overlapping(self, rect1, rect2):
|
51 |
x1, y1, x2, y2 = rect1
|
|
|
42 |
|
43 |
class EndpointHandler():
|
44 |
def __init__(self, path=""):
|
45 |
+
print("Downloading Model!")
|
46 |
self.ckpt_id = "ydshieh/kosmos-2-patch14-224"
|
47 |
|
48 |
self.model = AutoModelForVision2Seq.from_pretrained(self.ckpt_id, trust_remote_code=True).to("cuda")
|
49 |
self.processor = AutoProcessor.from_pretrained(self.ckpt_id, trust_remote_code=True)
|
50 |
+
print("Downloaded Model!")
|
51 |
|
52 |
def is_overlapping(self, rect1, rect2):
|
53 |
x1, y1, x2, y2 = rect1
|