Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,8 @@ config = {
|
|
50 |
|
51 |
tokenizer = T5Tokenizer.from_pretrained(t5_model)
|
52 |
latr = LaTrForVQA(config)
|
53 |
-
url = 'https://www.kaggleusercontent.com/kf/99663112/eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2In0..
|
|
|
54 |
|
55 |
|
56 |
try:
|
@@ -110,7 +111,7 @@ def answer_question(image, question):
|
|
110 |
tokenized_words = tokenized_words.unsqueeze(0)
|
111 |
question = question.unsqueeze(0)
|
112 |
|
113 |
-
print("Shape of Image is:", img.shape)
|
114 |
img = vit_feat_extract(img, return_tensors = 'pt')['pixel_values']
|
115 |
if int(len(img.shape)) == 3:
|
116 |
img = img.unsqueeze(0)
|
|
|
50 |
|
51 |
tokenizer = T5Tokenizer.from_pretrained(t5_model)
|
52 |
latr = LaTrForVQA(config)
|
53 |
+
url = 'https://www.kaggleusercontent.com/kf/99663112/eyJhbGciOiJkaXIiLCJlbmMiOiJBMTI4Q0JDLUhTMjU2In0..2HGa6jqeAbugMJYxSkh7eA.XkaLSf8XlITet17Bscupegw9zWLw-IEizSy1lM-_PJF_Gfj-YuinOpDw4ad0M8r-s3WlnclQhHYrd2seaZVjBmkm5WSE6Dae1fW54dnNhyWF5w5O2VafNar7QSuUTSRzacJcmtqI1ypL3OZofwXuETbXq4weeqfDptFS5luxuV0P4Vaer_xEgfsdld6v8O5jjMXwb1CVmPCjMdZUE-HTgzTDiwv3Lb-P3dkRgU7q-iI5GeYZCODYGrX-koxya9DlfzKQZXmJmvtMj45vUZ8OSRB0_hTc7UosQanA-SalWznnOuyOgwl4hMag5toTomriWsxfvJIRBn9CYgFcvUJNqO_kDzBUoAwnagjcxXeEIJTJglwAl9Rs37XyfJAZr7yQ_YTXeRW1j2QMsT_M3qtS96IKRTpsqPVibl8Vrs9Q5g_vKccIQR9t7R9ma_DZLwjWYhDvDO06AZqtdaYGfWaOrbqe8dDvJkZoHsZEO8ukpIH6YNLyCO_dqgRsE77I9jqxiUqQh1KnuNv2hGRSlQR7u8OF7lpiRS7JEwj2MaxlzD58dyhOOLDqrbLp7XWrgV79EQcRYHFSMfhDvG0zmGvHjWGAg-LGhnYIc0NMVhyRv5Pfta9WYEl4qXxCTZWe4olgV79WHLqksQMVyTteheB36n4biHZKx4KZj7k-j3aSI72DIAvj7_UFeHxUTTZ1c6MB.7BF6J5MPMuhQFU48xVZ2qQ/models/epoch=0-step=34602.ckpt'
|
54 |
+
|
55 |
|
56 |
|
57 |
try:
|
|
|
111 |
tokenized_words = tokenized_words.unsqueeze(0)
|
112 |
question = question.unsqueeze(0)
|
113 |
|
114 |
+
# print("Shape of Image is:", img.shape)
|
115 |
img = vit_feat_extract(img, return_tensors = 'pt')['pixel_values']
|
116 |
if int(len(img.shape)) == 3:
|
117 |
img = img.unsqueeze(0)
|