Skip to content

Commit

Permalink
works
Browse files Browse the repository at this point in the history
  • Loading branch information
klxu03 committed Jan 25, 2024
1 parent 406d533 commit 9347c53
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/evaluation/baselines.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,7 @@ def solve(self, input: Input, **kwargs) -> None:
# simplify HTML
# simplified_html = ActionUtils.simplify_html(html)
actions = Actions()
actions.capture_screen("screenshot.png")
image_path = os.path.join("screenshots", "screenshot.png")
image_path = actions.capture_screen("screenshot.png")

model = GPT4VModel()
command = model.get_vision_text_baseline_action(input.name, html, image_path)
Expand Down
Binary file removed src/evaluation/screenshots/screenshot.png
Binary file not shown.
7 changes: 4 additions & 3 deletions src/evaluation/vision.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ class Actions:
def __init__(self):
self.platform = platform.system()

if (self.platform == "Darwin" or self.platform == "Windows"):
self.width, self.height = pyautogui.size()
# if (self.platform == "Darwin" or self.platform == "Windows"):
self.width, self.height = pyautogui.size()

self.dir = "screenshots"

Expand Down Expand Up @@ -239,7 +239,8 @@ class GPT4VModel(VisionModel):
def __init__(self):
super().__init__(Models.GPT4V)
load_dotenv()
self.client = OpenAI(os.getenv("OPENAI_API_KEY"))
# api_key = os.getenv("OPENAI_API_KEY")
self.client = OpenAI()

def get_main_prompt(self, objective: str):
pass
Expand Down
File renamed without changes
File renamed without changes
File renamed without changes
Binary file added src/screenshots/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes

0 comments on commit 9347c53

Please sign in to comment.