forked from ishan0102/vimGPT
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
30 lines (22 loc) · 708 Bytes
/
main.py
File metadata and controls
30 lines (22 loc) · 708 Bytes
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
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)
if driver.perform_action(action): # returns True if done
break
if __name__ == "__main__":
try:
main()
except KeyboardInterrupt:
print("Exiting...")