forked from ishan0102/vimGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
31 lines (23 loc) · 750 Bytes
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import time
import vision
from vimbot import Vimbot
def main():
print("Initializing the Vimbot driver...")
driver = Vimbot()
print("Navigating to Google...")
driver.navigate("https://www.google.com")
objective = input("Please enter your objective: ")
while True:
time.sleep(1)
print("Capturing the screen...")
screenshot = driver.capture()
print("Getting actions for the given objective...")
action = vision.get_actions(screenshot, objective)
print(f"JSON Response: {action}")
if driver.perform_action(action): # returns True if done
break
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
print("Exiting...")