From 9b45f6bf00af200ecd13331e1706d061fe3cf029 Mon Sep 17 00:00:00 2001 From: Tianbao Xie <47296835+Timothyxxx@users.noreply.github.com> Date: Tue, 2 Apr 2024 22:18:46 +0800 Subject: [PATCH] Update README.md --- README.md | 37 ++++++++++++++++++++++++++++++------- 1 file changed, 30 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 9bc34be..5eac774 100644 --- a/README.md +++ b/README.md @@ -60,17 +60,40 @@ from desktop_env.envs.desktop_env import DesktopEnv example = { "id": "94d95f96-9699-4208-98ba-3c3119edf9c2", "instruction": "I want to install Spotify on my current system. Could you please help me?", - "config": [{"type": "execute", "parameters": { - "command": ["python", "-c", "import pyautogui; import time; pyautogui.click(960, 540); time.sleep(0.5);"]}}], - "evaluator": {"func": "check_include_exclude", "result": {"type": "vm_command_line", "command": "which spotify"}, - "expected": {"type": "rule", "rules": {"include": ["spotify"], "exclude": ["not found"]}}} + "config": [ + { + "type": "execute", + "parameters": { + "command": [ + "python", + "-c", + "import pyautogui; import time; pyautogui.click(960, 540); time.sleep(0.5);" + ] + } + } + ], + "evaluator": { + "func": "check_include_exclude", + "result": { + "type": "vm_command_line", + "command": "which spotify" + }, + "expected": { + "type": "rule", + "rules": { + "include": ["spotify"], + "exclude": ["not found"] + } + } + } } + env = DesktopEnv( path_to_vm="Ubuntu/Ubuntu.vmx", - action_space="pyautogui", - task_config=example + action_space="pyautogui" ) -obs = env.reset() + +obs = env.reset(task_config=example) obs, reward, done, info = env.step("pyautogui.rightClick()") ``` You will see all the logs of the system running normally, including the successful creation of the environment, completion of setup, and successful execution of actions. In the end, you will observe a successful right-click on the screen, which means you are ready to go.