CoolFace
Apppublic

baqr/computer_use_ootb

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
App README

<h2 align="center"> <a href="https://computer-use-ootb.github.io"> <img src="./assets/ootb_logo.png" alt="Logo" style="display: block; margin: 0 auto; filter: invert(1) brightness(2);"> </a> </h2>

<h5 align="center"> If you like our project, please give us a star ⭐ on GitHub for the latest update.</h5>

<h5 align=center>

![arXiv](https://arxiv.org/abs/2411.10323) ![Project Page](https://computer-use-ootb.github.io) ![Hits](https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=https%3A%2F%2Fgithub.com%2Fshowlab%2Fcomputeruseootb&countbg=%2379C83D&titlebg=%23555555&icon=&iconcolor=%23E7E7E7&title=hits&edgeflat=false)

</h5>

<img src="./assets/ootb_icon.png" alt="Star" style="height:25px; vertical-align:middle; filter: invert(1) brightness(2);"> Overview

Computer Use <span style="color:rgb(106, 158, 210)">O</span><span style="color:rgb(111, 163, 82)">O</span><span style="color:rgb(209, 100, 94)">T</span><span style="color:rgb(238, 171, 106)">B</span><img src="./assets/ootb_icon.png" alt="Star" style="height:20px; vertical-align:middle; filter: invert(1) brightness(2);"> is an out-of-the-box (OOTB) solution for Desktop GUI Agent, including API-based (Claude 3.5 Computer Use) and locally-running models (<span style="color:rgb(106, 158, 210)">S</span><span style="color:rgb(111, 163, 82)">h</span><span style="color:rgb(209, 100, 94)">o</span><span style="color:rgb(238, 171, 106)">w</span>UI, UI-TARS).

No Docker is required, and it supports both Windows and macOS. OOTB provides a user-friendly interface based on Gradio. 🎨

Visit our study on GUI Agent of Claude 3.5 Computer Use [[project page]](https://computer-use-ootb.github.io). 🌐

Update

  • β€”[2025/02/08] We've added the support for **UI-TARS**. Follow Cloud Deployment or VLLM deployment to implement UI-TARS and run it locally in OOTB.
  • β€”Major Update! [2024/12/04] Local RunπŸ”₯ is now live! Say hello to **<span style="color:rgb(106, 158, 210)">S</span><span style="color:rgb(111, 163, 82)">h</span><span style="color:rgb(209, 100, 94)">o</span><span style="color:rgb(238, 171, 106)">w</span>UI**, an open-source 2B vision-language-action (VLA) model for GUI Agent. Now compatible with "gpt-4o + ShowUI" (~200x cheaper) & `"Qwen2-VL + ShowUI" (~30x cheaper)` for only few cents for each taskπŸ’°! <span style="color: grey; font-size: small;">*compared to Claude Computer Use</span>.
  • β€”[2024/11/20] We've added some examples to help you get hands-on experience with Claude 3.5 Computer Use.
  • β€”[2024/11/19] Forget about the single-display limit set by Anthropic - you can now use multiple displays πŸŽ‰!
  • β€”[2024/11/18] We've released a deep analysis of Claude 3.5 Computer Use: https://arxiv.org/abs/2411.10323.
  • β€”[2024/11/11] Forget about the low-resolution display limit set by Anthropic β€” you can now use any resolution you like and still keep the screenshot token cost low πŸŽ‰!
  • β€”[2024/11/11] Now both Windows and macOS platforms are supported πŸŽ‰!
  • β€”[2024/10/25] Now you can Remotely Control your computer πŸ’» through your mobile device πŸ“± β€” No Mobile App Installation required! Give it a try and have fun πŸŽ‰.

Demo Video

https://github.com/user-attachments/assets/f50b7611-2350-4712-af9e-3d31e30020ee

<div style="display: flex; justify-content: space-around;"> <a href="https://youtu.be/Ychd-t24HZw" target="blank" style="margin-right: 10px;"> <img src="https://img.youtube.com/vi/Ychd-t24HZw/maxresdefault.jpg" alt="Watch the video" width="48%"> </a> <a href="https://youtu.be/cvgPBazxLFM" target="blank"> <img src="https://img.youtube.com/vi/cvgPBazxLFM/maxresdefault.jpg" alt="Watch the video" width="48%"> </a> </div>

πŸš€ Getting Started

0. Prerequisites

  • β€”Instal Miniconda on your system through this link. (Python Version: >= 3.12).
  • β€”Hardware Requirements (optional, for ShowUI local-run):
  • β€”Windows (CUDA-enabled): A compatible NVIDIA GPU with CUDA support, >=6GB GPU memory
  • β€”macOS (Apple Silicon): M1 chip (or newer), >=16GB unified RAM

1. Clone the Repository πŸ“‚

Open the Conda Terminal. (After installation Of Miniconda, it will appear in the Start menu.) Run the following command on Conda Terminal.

bash
git clone https://github.com/showlab/computer_use_ootb.git
cd computer_use_ootb

2.1 Install Dependencies πŸ”§

bash
pip install -r dev-requirements.txt

2.2 (Optional) Get Prepared for <span style="color:rgb(106, 158, 210)">S</span><span style="color:rgb(111, 163, 82)">h</span><span style="color:rgb(209, 100, 94)">o</span><span style="color:rgb(238, 171, 106)">w</span>UI Local-Run

  1. 1.Download all files of the ShowUI-2B model via the following command. Ensure the ShowUI-2B folder is under the computer_use_ootb folder.
python
    python install_tools/install_showui.py
  1. 1.Make sure to install the correct GPU version of PyTorch (CUDA, MPS, etc.) on your machine. See install guide and verification.
  1. 1.Get API Keys for GPT-4o or Qwen-VL. For mainland China users, Qwen API free trial for first 1 mil tokens is available.

2.3 (Optional) Get Prepared for UI-TARS Local-Run

  1. 1.Follow Cloud Deployment or VLLM deployment guides to deploy your UI-TARS server.
  1. 1.Test your UI-TARS sever with the script .\install_tools\test_ui-tars_server.py.

2.4 (Optional) If you want to deploy Qwen model as planner on ssh server

  1. 1.git clone this project on your ssh server
  1. 1.python computerusedemo/remote_inference.py

3. Start the Interface ▢️

Start the OOTB interface:

bash
python app.py

If you successfully start the interface, you will see two URLs in the terminal:

bash
* Running on local URL:  http://127.0.0.1:7860
* Running on public URL: https://xxxxxxxxxxxxxxxx.gradio.live (Do not share this link with others, or they will be able to control your computer.)
<u>For convenience</u>, we recommend running one or more of the following command to set API keys to the environment variables before starting the interface. Then you don’t need to manually pass the keys each run. On Windows Powershell (via the set command if on cmd): ``bash $env:ANTHROPIC_API_KEY="sk-xxxxx" (Replace with your own key) $env:QWEN_API_KEY="sk-xxxxx" $env:OPENAI_API_KEY="sk-xxxxx" ` On macOS/Linux, replace $env:ANTHROPICAPIKEY with export ANTHROPICAPIKEY` in the above command.

4. Control Your Computer with Any Device can Access the Internet

  • β€”Computer to be controlled: The one installed software.
  • β€”Device Send Command: The one opens the website.

Open the website at http://localhost:7860/ (if you're controlling the computer itself) or https://xxxxxxxxxxxxxxxxx.gradio.live in your mobile browser for remote control.

Enter the Anthropic API key (you can obtain it through this website), then give commands to let the AI perform your tasks.

ShowUI Advanced Settings

We provide a 4-bit quantized ShowUI-2B model for cost-efficient inference (currently only support CUDA devices). To download the 4-bit quantized ShowUI-2B model:

python install_tools/install_showui-awq-4bit.py

Then, enable the quantized setting in the 'ShowUI Advanced Settings' dropdown menu.

Besides, we also provide a slider to quickly adjust the max_pixel parameter in the ShowUI model. This controls the visual input size of the model and greatly affects the memory and inference speed.

πŸ“Š GUI Agent Model Zoo

Now, OOTB supports customizing the GUI Agent via the following models:

  • β€”Unified Model: Unified planner & actor, can both make the high-level planning and take the low-level control.
  • β€”Planner: General-purpose LLMs, for handling the high-level planning and decision-making.
  • β€”Actor: Vision-language-action models, for handling the low-level control and action command generation.

<div align="center"> <b>Supported GUI Agent Models, OOTB</b>

</div> <table align="center"> <tbody> <tr align="center" valign="bottom"> <td> <b>[API] Unified Model</b> </td> <td> <b>[API] Planner</b> </td> <td> <b>[Local] Planner</b> </td> <td> <b>[API] Actor</b> </td> <td> <b>[Local] Actor</b> </td> </tr> <tr valign="top"> <td> <ul> <li><a href="">Claude 3.5 Sonnet</a></li> </ul> </td> <td> <ul> <li><a href="">GPT-4o</a></li> <li><a href="">Qwen2-VL-Max</a></li> <li><a href="">Qwen2-VL-2B(ssh)</a></li> <li><a href="">Qwen2-VL-7B(ssh)</a></li> <li><a href="">Qwen2.5-VL-7B(ssh)</a></li> <li><a href="">Deepseek V3 (soon)</a></li> </ul> </td> <td> <ul> <li><a href="">Qwen2-VL-2B</a></li> <li><a href="">Qwen2-VL-7B</a></li> </ul> </td> <td> <ul> <li><a href="https://github.com/showlab/ShowUI">ShowUI</a></li> <li><a href="https://huggingface.co/bytedance-research/UI-TARS-7B-DPO">UI-TARS-7B/72B-DPO (soon)</a></li> </ul> </td> <td> <ul> <li><a href="https://github.com/showlab/ShowUI">ShowUI</a></li> <li><a href="https://huggingface.co/bytedance-research/UI-TARS-7B-DPO">UI-TARS-7B/72B-DPO</a></li> </ul> </td> </tr> </td> </table>

where [API] models are based on API calling the LLMs that can inference remotely,

and [Local] models can use your own device that inferences locally with no API costs.

πŸ–₯️ Supported Systems

  • β€”Windows (Claude βœ…, ShowUI βœ…)
  • β€”macOS (Claude βœ…, ShowUI βœ…)

πŸ‘“ OOTB Iterface

<div style="display: flex; align-items: center; gap: 10px;"> <figure style="text-align: center;"> <img src="./assets/gradio_interface.png" alt="Desktop Interface" style="width: auto; object-fit: contain;"> </figure> </div>

⚠️ Risks

  • β€”Potential Dangerous Operations by the Model: The models' performance is still limited and may generate unintended or potentially harmful outputs. Recommend continuously monitoring the AI's actions.
  • β€”Cost Control: Each task may cost a few dollars for Claude 3.5 Computer Use.πŸ’Έ

πŸ“… Roadmap

  • β€”[ ] Explore available features
  • β€”[ ] The Claude API seems to be unstable when solving tasks. We are investigating the reasons: resolutions, types of actions required, os platforms, or planning mechanisms. Welcome any thoughts or comments on it.
  • β€”[ ] Interface Design
  • β€”[x] Support for Gradio ✨
  • β€”[ ] Simpler Installation
  • β€”[ ] More Features... πŸš€
  • β€”[ ] Platform
  • β€”[x] Windows
  • β€”[x] macOS
  • β€”[x] Mobile (Send command)
  • β€”[ ] Mobile (Be controlled)
  • β€”[ ] Support for More MLLMs
  • β€”[x] Claude 3.5 Sonnet 🎡
  • β€”[x] GPT-4o
  • β€”[x] Qwen2-VL
  • β€”[ ] Local MLLMs
  • β€”[ ] ...
  • β€”[ ] Improved Prompting Strategy
  • β€”[ ] Optimize prompts for cost-efficiency. πŸ’‘
  • β€”[x] Improved Inference Speed
  • β€”[x] Support int4 Quantization.

Join Discussion

Welcome to discuss with us and continuously improve the user experience of Computer Use - OOTB. Reach us using this **Discord Channel** or the WeChat QR code below!

<div style="display: flex; flex-direction: row; justify-content: space-around;">

<!-- <img src="./assets/wechat2.jpg" alt="gradiointerface" width="30%"> --> <img src="./assets/wechat3.jpg" alt="gradiointerface" width="30%">

</div>

<div style="height: 30px;"></div>

<hr> <a href="https://computer-use-ootb.github.io"> <img src="./assets/ootb_logo.png" alt="Logo" width="30%" style="display: block; margin: 0 auto; filter: invert(1) brightness(2);"> </a>