-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathanalyzer.py
More file actions
19 lines (11 loc) · 829 Bytes
/
analyzer.py
File metadata and controls
19 lines (11 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import sys
from vqa import VQA
system_prompt = "If the statement starts with 'animal:' then Reply with type of animal the sentence is talking about, using one wordm else If the statement starts with 'car:' then Reply with the type of vehicle the sentence is talking about."
url = 'https://ha.kennethroe.com/api/frigate/frigate/snapshot/1729512173.614739-pmvkiz?authSig=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiI4YWQzYTEzYjk3YzY0MWJiOWNjZTQ1YWI3ODNkYzU0OSIsInBhdGgiOiIvYXBpL2ZyaWdhdGUvZnJpZ2F0ZS9zbmFwc2hvdC8xNzI5NTEyMTczLjYxNDczOS1wbXZraXoiLCJwYXJhbXMiOltdLCJpYXQiOjE3Mjk1MTcwOTQsImV4cCI6MTcyOTYwMzQ5NH0._Y2U7gTzq1tcKhvyrqvTH97WwouPnJj6UnN1fU8dC_0'
if len(sys.argv) == 1:
print("ERROR: Pass image_url as argument.")
exit()
image_url = sys.argv[1]
vqa = VQA(system_prompt)
out = vqa.analyze(url)
print(out)