Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ screenshot*
vimGPT/
.env
__pycache__/
node_modules/
9 changes: 2 additions & 7 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
import argparse
import time

from whisper_mic import WhisperMic

import vision
from vimbot import Vimbot


def main(voice_mode):
print("Initializing the Vimbot driver...")
driver = Vimbot()
Expand All @@ -25,19 +22,18 @@ def main(voice_mode):
print(f"Objective received: {objective}")
else:
objective = input("Please enter your objective: ")
model = input("Please enter a model to use (llava, gpt4v, cogvlm, claude): ")

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)
action = vision.get_actions(screenshot, objective, model)
print(f"JSON Response: {action}")
if driver.perform_action(action): # returns True if done
break


def main_entry():
parser = argparse.ArgumentParser(description="Run the Vimbot with optional voice input.")
parser.add_argument(
Expand All @@ -48,7 +44,6 @@ def main_entry():
args = parser.parse_args()
main(args.voice)


if __name__ == "__main__":
try:
main_entry()
Expand Down
220 changes: 220 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "vimgpt",
"version": "1.0.0",
"description": "Giving multimodal models an interface to play with.",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"playwright": "^1.42.1",
"replicate": "^0.29.1"
}
}
Loading