mirrored 3 minutes ago
0
TimothyxxxUpdate GIMP evaluation examples to replace local file paths with cloud file URLs for consistency and accessibility. 9be5184
{
  "id": "d16c99dc-2a1e-46f2-b350-d97c86c85c15",
  "snapshot": "gimp",
  "instruction": "Could you assist me with resizing the dog layer of an image? I need to adjust the height to 512 pixels while maintaining the original aspect ratio?",
  "source": "https://stackoverflow.com/questions/75185543/use-gimp-to-resize-image-in-one-layer-only",
  "config": [
    {
      "type": "download",
      "parameters": {
        "files": [
          {
            "url": "https://huggingface.co/datasets/xlangai/ubuntu_osworld_file_cache/resolve/main/gimp/d16c99dc-2a1e-46f2-b350-d97c86c85c15/dog_with_background.png",
            "path": "/home/user/Desktop/dog_with_background.png"
          },
          {
            "url": "https://huggingface.co/datasets/xlangai/ubuntu_osworld_file_cache/resolve/main/gimp/d16c99dc-2a1e-46f2-b350-d97c86c85c15/dog_with_background_two_layers.xcf",
            "path": "/home/user/Desktop/dog_with_background_two_layers.xcf"
          }
        ]
      }
    },
    {
      "type": "launch",
      "parameters": {
        "command": [
          "gimp",
          "/home/user/Desktop/dog_with_background_two_layers.xcf"
        ]
      }
    }
  ],
  "trajectory": "trajectories/",
  "related_apps": [
    "gimp"
  ],
  "evaluator": {
    "postconfig": [
      {
        "type": "activate_window",
        "parameters": {
          "window_name": "GNU Image Manipulation Program"
        }
      },
      {
        "type": "execute",
        "parameters": {
          "command": [
            "python3",
            "-c",
            "import time; import pyautogui; time.sleep(1);pyautogui.hotkey([\"shift\", \"ctrl\", \"e\"]);time.sleep(1);"
          ]
        }
      },
      {
        "type": "sleep",
        "parameters": {
          "seconds": 0.5
        }
      },
      {
        "type": "execute",
        "parameters": {
          "command": [
            "python3",
            "-c",
            "import time; import pyautogui; pyautogui.write(\"resized\");time.sleep(1);pyautogui.press([\"enter\"]);"
          ]
        }
      },
      {
        "type": "sleep",
        "parameters": {
          "seconds": 2
        }
      },
      {
        "type": "execute",
        "parameters": {
          "command": [
            "python3",
            "-c",
            "import pyautogui; pyautogui.press([\"enter\"]);"
          ]
        }
      },
      {
        "type": "sleep",
        "parameters": {
          "seconds": 5
        }
      }
    ],
    "func": [
      "check_image_size",
      "check_structure_sim_resized"
    ],
    "conj": "and",
    "expected": [
      {
        "type": "rule",
        "rules": {
          "height": 512,
          "ignore_transparent": true
        }
      },
      {
        "type": "cloud_file",
        "path": "https://huggingface.co/datasets/xlangai/ubuntu_osworld_file_cache/resolve/main/gimp/d16c99dc-2a1e-46f2-b350-d97c86c85c15/dog_with_background.png",
        "dest": "dog_with_background.png"
      }
    ],
    "result": [
      {
        "type": "vm_file",
        "path": "/home/user/Desktop/resized.png",
        "dest": "resized.png"
      },
      {
        "type": "vm_file",
        "path": "/home/user/Desktop/resized.png",
        "dest": "resized.png"
      }
    ]
  },
  "proxy": false,
  "fixed_ip": false,
  "possibility_of_env_change": "low"
}