更新一键安装功能

This commit is contained in:
yuruo 2025-03-19 16:27:16 +08:00
parent 0e51279708
commit 0af9bcaaa8
7 changed files with 195 additions and 91 deletions

View File

@ -2,60 +2,60 @@
<img src="./resources/logo.png" width="120" height="120" alt="autoMate logo">
<h1>autoMate</h1>
<p><b>🤖 AI-Powered Local Automation Tool | Let Your Computer Work for You</b></p>
<p><b>🤖 AI-powered Local Automation Tool | Make Your Computer Work For You</b></p>
[简体中文](./README_CN.md) | [日本語](./README_JA.md)
[中文](./README_CN.md) | [日本語](./README_JA.md)
>"Automate the tedious, reclaim your time for life"
https://github.com/user-attachments/assets/bf27f8bd-136b-402e-bc7d-994b99bcc368
</div>
> Special Note: The autoMate project is still in a very early stage. Its current capabilities are limited and it's primarily for learning and communication purposes. However, we are continuously seeking breakthroughs and integrating the latest technologies!If you have any question, add my wechat.
> Special Note: The autoMate project is still in a very early stage and is currently more for learning purposes. We are constantly looking for breakthroughs and continuously integrating the latest technologies! If you have any questions, you can also add WeChat friends to join the group for communication.
<div align="center">
<img src="./resources/wxchat.png" width="120" height="120" alt="autoMate logo">
</div>
## 💫 Redefining Your Relationship with Computers
Tired of working late nights on repetitive tasks? Frustrated by mundane activities consuming your creativity and precious time?
## 💫 Redefine Your Relationship with Computers
autoMate is not just another tool - it's your intelligent digital colleague for the AGI era, working tirelessly to help you restore balance between work and life.
Unlike the complexity of traditional RPA tools, autoMate leverages the power of large language models to complete complex automation processes with just natural language descriptions of tasks. Say goodbye to repetitive work and focus on what truly creates value!
**Let automation create more possibilities for your life.**
## 💡 Project Overview
autoMate is a revolutionary AI+RPA automation tool built on OmniParser, turning AI into your "digital employee" that can:
## 💡 Project Introduction
autoMate is a revolutionary AI+RPA automation tool built on OmniParser that can:
- 📊 Automatically operate your computer interface and complete complex workflows
- 🔍 Intelligently understand screen content, simulating human vision and operations
- 🧠 Make autonomous decisions and take actions based on task requirements
- 📊 Understand your needs and automatically plan tasks
- 🔍 Intelligently comprehend screen content, simulating human vision and operations
- 🧠 Make autonomous decisions, judging and taking actions based on task requirements
- 💻 Support local deployment to protect your data security and privacy
## ✨ Features
- 🔮 No-Code Automation - Use natural language to describe tasks, no programming knowledge required
- 🔮 No-Code Automation - Describe tasks in natural language, no programming knowledge required
- 🖥️ Full Interface Control - Support operations on any visual interface, not limited to specific software
- 🚅 Simplified Installation - Streamlined installation process compared to official version, supports Chinese environment, one-click deployment
- 🔒 Local Operation - Protect data security, no privacy concerns
- 🚅 Simplified Installation - Support for Chinese environment, one-click deployment
## 🚀 Quick Start
### 📦 Installation
Clone the project and set up the environment:
It is strongly recommended to install miniConda first and use miniconda to install dependencies. There are many tutorials online; if you're still confused, you can ask AI. Then install the environment according to the following commands:
```bash
# Clone the project
git clone https://github.com/yuruotong1/autoMate.git
cd autoMate
# Create python3.12 environment
conda create -n "automate" python==3.12
# Activate environment
conda activate automate
pip install -r requirements.txt
# Install dependencies
python install.py
```
### 🎮 Launch Application
@ -65,26 +65,31 @@ python main.py
Then open `http://localhost:7888/` in your browser to configure your API key and basic settings.
Support model:
The models that have been tested and are currently supported are as follows:
| Vendor| Model |
| --- | --- |
|[yeka](https://2233.ai/api)|gpt-4o,o1|
|openai|gpt-4o,gpt-4o-2024-08-06,gpt-4o-2024-11-20,o1,4.gpt-4.5-preview-2025-02-27,|
|openai|gpt-4o,gpt-4o-2024-08-06,gpt-4o-2024-11-20,o1,4.gpt-4.5-preview-2025-02-27|
## 📝 FAQ
### What models are supported?
Currently, only OpenAI series models are supported. If you cannot access OpenAI from mainland China, it is recommended to use [yeka](https://2233.ai/api) as a proxy.
### 🔧 CUDA Version Mismatch
We recommend using an NVIDIA graphics card with at least 4GB of VRAM, although you can also run it on CPU (which will be very slow):
Why don't we support other models yet? We utilize multimodal + structured output capabilities, and few other model providers can simultaneously support these two capabilities. Adapting to other models would require significant changes to our underlying architecture, and effectiveness cannot be guaranteed. However, we are actively seeking solutions and will update as soon as progress is made.
1. Run `pip list` to check the torch version;
2. Check supported CUDA versions on the [official website](https://pytorch.org/get-started/locally/);
3. Uninstall the currently installed torch and torchvision;
4. Copy the official torch installation command and reinstall torch for your CUDA version.
For example, if your CUDA version is 12.4, install torch using this command:
### Why is my execution speed slow?
If your computer doesn't have an NVIDIA dedicated GPU, it will run relatively slowly because we frequently call OCR to annotate visuals, which consumes a lot of GPU resources. We are actively optimizing and adapting. It is recommended to use an NVIDIA graphics card with no less than 4GB of memory, and ensure the version is compatible with your torch version:
1. Run `pip list` to check your torch version;
2. Check supported CUDA versions from the [official website](https://pytorch.org/get-started/locally/);
3. Uninstall existing torch and torchvision;
3. Copy the official torch installation command and reinstall torch suitable for your CUDA version.
For example, if my CUDA version is 12.4, I need to install torch using the following command:
```bash
pip3 uninstall -y torch torchvision
@ -92,11 +97,11 @@ pip3 install torch torchvision torchaudio --index-url https://download.pytorch.o
```
## 🤝 Contributing
## 🤝 Contribute
Every excellent open-source project embodies collective wisdom. autoMate's growth depends on your participation and contribution. Whether fixing bugs, adding features, or improving documentation, your efforts will help thousands of people break free from repetitive work.
Every excellent open-source project crystallizes collective wisdom. The growth of autoMate depends on your participation and contribution. Whether fixing bugs, adding features, or improving documentation, each of your efforts will help thousands of people break free from repetitive work.
Join us in creating a more intelligent future.
Join us in creating a smarter future.
<a href="https://github.com/yuruotong1/autoMate/graphs/contributors">
<img src="https://contrib.rocks/image?repo=yuruotong1/autoMate" />
@ -105,6 +110,6 @@ Join us in creating a more intelligent future.
---
<div align="center">
⭐ Every star is an encouragement to creators and an opportunity for more people to discover and benefit from autoMate ⭐
Your support today is our motivation for tomorrow
⭐ Every star is encouragement for the creators and an opportunity for more people to discover and benefit from autoMate ⭐
Your support today is our motivation to move forward tomorrow
</div>

View File

@ -4,6 +4,8 @@
<h1>autoMate</h1>
<p><b>🤖 AI驱动的本地自动化工具 | 让电脑自己会干活</b></p>
[English](./README.md) | [日本語](./README_JA.md)
>"让繁琐自动化,把时间还给生活"
https://github.com/user-attachments/assets/bf27f8bd-136b-402e-bc7d-994b99bcc368
@ -11,7 +13,7 @@ https://github.com/user-attachments/assets/bf27f8bd-136b-402e-bc7d-994b99bcc368
</div>
> 特别声明autoMate 项目还处于非常早期阶段,目前的能力还不足以解决任何问题,当前仅限于学习和交流。不过我会不断的寻求突破点不停地融入最新的技术如果你有任何疑问也可以加vx好友入群交流。
> 特别声明autoMate 项目还处于非常早期阶段,当前更多用于学习。我们会不断的寻求突破点不停地融入最新的技术如果你有任何疑问也可以加vx好友入群交流。
<div align="center">
<img src="./resources/wxchat.png" width="120" height="120" alt="autoMate logo">
@ -36,21 +38,24 @@ autoMate 是一款革命性的AI+RPA自动化工具基于OmniParser构建
- 🔮 无代码自动化 - 使用自然语言描述任务,无需编程知识
- 🖥️ 全界面操控 - 支持任何可视化界面的操作,不限于特定软件
- 🚅 简化安装 - 比官方版本更简洁的安装流程,支持中文环境,一键部署
- 🚅 简化安装 - 支持中文环境,一键部署
## 🚀 快速开始
### 📦 安装
Clone项目然后安装环境:
强烈建议先安装miniConda用miniconda安装依赖网上有很多教程实在不懂可以问AI。然后按照下面命令安装环境:
```bash
# 把项目拉下来
git clone https://github.com/yuruotong1/autoMate.git
cd autoMate
# 创建 python3.12 环境
conda create -n "automate" python==3.12
# 激活环境
conda activate automate
pip install -r requirements.txt
# 安装相关依赖
python install.py
```
### 🎮 启动应用
@ -60,21 +65,24 @@ python main.py
然后在浏览器中打开`http://localhost:7888/`配置您的API密钥和基本设置。
目前支持的模型如下:
目前已经测试并且支持的模型如下:
| Vendor| Model |
| --- | --- |
|[yeka](https://2233.ai/api)|gpt-4o,o1|
|openai|gpt-4o,gpt-4o-2024-08-06,gpt-4o-2024-11-20,o1,4.gpt-4.5-preview-2025-02-27,|
|openai|gpt-4o,gpt-4o-2024-08-06,gpt-4o-2024-11-20,o1,4.gpt-4.5-preview-2025-02-27|
## 📝常见问题
### 支持什么模型?
目前仅支持 OpenAI 系列模型,如果国内不能访问 OpenAI建议使用[yeka](https://2233.ai/api)进行中转。
### 🔧CUDA版本不匹配问题
建议使用不少于 4G 显存的英伟达显卡运行当然也可以用CPU运行只是会非常慢
为什么目前不支持其他模型?我们用到了多模态+结构化输出能力,其他模型厂商很少能够同时支持这两个能力,如果适配其他模型的话,我们要对底层进行较大修改,效果也不能得到保证。但是我们正在积极寻找解决方案,一有更新会立即同步出来。
### 为什么我的执行速度很慢?
如果你的电脑没有NVIDIA独显的话运行的会比较慢因为我们会高频次调用OCR对视觉进行标注这会消耗大量的GPU资源我们也在积极进行优化和适配。建议使用不少于 4G 显存的英伟达显卡运行并且版本和torch版本一致
1. 运行`pip list`查看torch版本
2. 从[官网](https://pytorch.org/get-started/locally/)查看支持的cuda版本

View File

@ -2,97 +2,106 @@
<img src="./resources/logo.png" width="120" height="120" alt="autoMate logo">
<h1>autoMate</h1>
<p><b>🤖 AI搭載ローカル自動化ツール | パソコンに仕事を任せよう</b></p>
<p><b>🤖 AIで動くローカル自動化ツール | コンピューターに自ら仕事をさせる</b></p>
[English](./README.md) | [简体中文](./README_CN.md)
>"面倒な作業を自動化し、人生の時間を取り戻そう"
>"面倒な作業を自動化し、時間を生活に戻す"
https://github.com/user-attachments/assets/bf27f8bd-136b-402e-bc7d-994b99bcc368
</div>
> 特記事項autoMateプロジェクトは現在、非常に初期段階にあります。現時点での機能は限定的で、主に学習とコミュニケーションを目的としています。しかし、私たちは継続的にブレークスルーを追求し、最新技術を統合していますご質問がありましたら、WeChatでお気軽にお問い合わせください
> 特別声明autoMateプロジェクトはまだ非常に初期段階にあり、現在は主に学習目的で使用されています。私たちは常にブレークスルーを求め、最新技術を取り入れています質問がある場合は、WeChat友達追加してグループチャットに参加することもできます
<div align="center">
<img src="./resources/wxchat.png" width="120" height="120" alt="autoMate logo">
</div>
## 💫 パソコンとの関係を再定義
反復的な作業で夜遅くまで働くことに疲れていませんか?単調な作業があなたの創造性と貴重な時間を奪っていませんか?
## 💫 コンピューターとの関係を再定義する
autoMateは単なるツールではありません - AGI時代のインテリジェントなデジタル同僚として、仕事と生活のバランスを取り戻すためにたゆまぬ努力を続けています。
従来のRPAツールの複雑さとは異なり、autoMateは大規模言語モデルの能力を活用し、自然言語でタスクを記述するだけで、AIが複雑な自動化プロセスを完了できます。繰り返し作業に別れを告げ、真に価値を生み出すことに集中しましょう
**自動化であなたの人生にもっと可能性を。**
**自動化であなたの生活にさらなる可能性を創造しましょう。**
## 💡 プロジェクト概要
autoMateは、OmniParserを基盤とした革新的なAI+RPA自動化ツールで、AIをあなたの「デジタル従業員」に変えます:
autoMateは革新的なAI+RPA自動化ツールで、OmniParserをベースに構築されています。次のことが可能です:
- 📊 パソコンインターフェースを自動操作し、複雑なワークフローを完了
- 🔍 画面の内容を知的に理解し、人間の視覚と操作をシミュレート
- 🧠 タスク要件に基づいて自律的に判断し行動
- 💻 ローカルデプロイメントでデータセキュリティとプライバシーを保護
- 📊 あなたのニーズを理解し、タスクを自動的に計画
- 🔍 画面の内容をインテリジェントに理解し、人間の視覚と操作をシミュレート
- 🧠 自律的に判断し、タスク要件に基づいて行動
- 💻 ローカルデプロイメントをサポートし、データのセキュリティとプライバシーを保護
## ✨ 特徴
- 🔮 ノーコード自動化 - 自然言語でタスクを記述、プログラミング知識不要
- 🖥️ 完全なインターフェース制御 - 特定のソフトウェアに限定されない、あらゆる視覚的インターフェースでの操作をサポート
- 🚅 簡単インストール - 公式版と比べてインストール手順を簡素化、日本語環境対応、ワンクリックデプロイメント
- 🔒 ローカル実行 - データセキュリティを保護、プライバシーの心配なし
- 🔮 コードレス自動化 - プログラミング知識なしで自然言語でタスクを記述
- 🖥️ 全画面操作 - 特定のソフトウェアに限定されず、あらゆる視覚的インターフェースの操作をサポート
- 🚅 簡単インストール - 日本語環境をサポート、ワンクリックデプロイ
## 🚀 クイックスタート
### 📦 インストール
プロジェクトをクローンし、環境をセットアップ
miniCondaを先にインストールし、minicondaで依存関係をインストールすることを強くお勧めします。インターネット上に多くのチュートリアルがあり、分からない場合はAIに質問できます。以下のコマンドで環境をインストールしてください
```bash
# プロジェクトをクローン
git clone https://github.com/yuruotong1/autoMate.git
cd autoMate
# python3.12環境を作成
conda create -n "automate" python==3.12
# 環境をアクティベート
conda activate automate
pip install -r requirements.txt
# 関連する依存関係をインストール
python install.py
```
### 🎮 アプリケーションの起動
```bash
python main.py
```
ブラウザで`http://localhost:7888/`を開き、APIキーと基本設定を構成してください
ブラウザで`http://localhost:7888/`を開き、APIキーと基本設定を構成します
## 📝 よくある質問
### 🔧 CUDAバージョンの不一致
4GB以上のVRAMを搭載したNVIDIAグラフィックスカードの使用を推奨しますが、CPU上での実行も可能ですただし非常に遅くなります
現在テスト済みでサポートされているモデルは以下の通りです:
1. `pip list`を実行してtorchバージョンを確認
2. [公式サイト](https://pytorch.org/get-started/locally/)で対応するCUDAバージョンを確認
3. 現在インストールされているtorchとtorchvisionをアンインストール
4. 公式のtorchインストールコマンドをコピーし、お使いのCUDAバージョン用のtorchを再インストール。
例えば、CUDAバージョンが12.4の場合、以下のコマンドでtorchをインストール
| ベンダー | モデル |
| --- | --- |
|[yeka](https://2233.ai/api)|gpt-4o,o1|
|openai|gpt-4o,gpt-4o-2024-08-06,gpt-4o-2024-11-20,o1,4.gpt-4.5-preview-2025-02-27|
## 📝よくある質問
### どのモデルをサポートしていますか?
現在はOpenAIシリーズモデルのみをサポートしています。中国国内からOpenAIにアクセスできない場合は、[yeka](https://2233.ai/api)を使用した中継をお勧めします。
なぜ他のモデルをサポートしていないのですか?マルチモーダル+構造化出力機能を使用しており、他のモデルベンダーはこの2つの機能を同時にサポートしていることがまれです。他のモデルに対応するには、基礎部分に大きな変更が必要で、効果も保証できません。しかし、私たちは積極的に解決策を探しており、更新があればすぐに同期します。
### 実行速度が遅いのはなぜですか?
コンピューターにNVIDIA独立グラフィックカードがない場合、実行は比較的遅くなります。視覚的注釈のためにOCRを高頻度で呼び出すため、大量のGPUリソースを消費します。私たちも積極的に最適化と適応を行っています。4GB以上のビデオメモリを持つNVIDIAグラフィックカードの使用をお勧めします。また、バージョンとtorchバージョンが一致していることを確認してください
1. `pip list`を実行してtorchバージョンを確認します。
2. [公式サイト](https://pytorch.org/get-started/locally/)からサポートされているcudaバージョンを確認します。
3. インストール済みのtorchとtorchvisionをアンインストールします。
3. 公式のtorchインストールコマンドをコピーして、自分のcudaバージョンに適したtorchを再インストールします。
例えば、cudaバージョンが12.4の場合、以下のコマンドでtorchをインストールする必要があります
```bash
pip3 uninstall -y torch torchvision
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu124
```
現在サポートされているモデルは以下の通りです:
## 🤝 共同構築への参加
| Vendor| Model |
| --- | --- |
|[yeka](https://2233.ai/api)|gpt-4o,o1|
|openai|gpt-4o,gpt-4o-2024-08-06,gpt-4o-2024-11-20,o1,4.gpt-4.5-preview-2025-02-27,|
すべての優れたオープンソースプロジェクトは集合知の結晶です。autoMateの成長はあなたの参加と貢献なしには達成できません。バグの修正、機能の追加、ドキュメントの改善など、あなたの貢献はすべて、何千何万もの人々が繰り返し作業から解放されるのを助けます。
## 🤝 コントリビューション
優れたオープンソースプロジェクトは集合知の結晶です。autoMateの成長はあなたの参加と貢献に依存しています。バグ修正、機能追加、ドキュメント改善など、あなたの努力は何千人もの人々を反復作業から解放することにつながります。
より知的な未来を一緒に創造しましょう。
私たちと一緒に、よりスマートな未来を創造しましょう。
<a href="https://github.com/yuruotong1/autoMate/graphs/contributors">
<img src="https://contrib.rocks/image?repo=yuruotong1/autoMate" />
@ -101,6 +110,6 @@ pip3 install torch torchvision torchaudio --index-url https://download.pytorch.o
---
<div align="center">
⭐ 一つ一つのスターは開発者への励みであり、より多くの人々がautoMateを発見し恩恵を受ける機会となります ⭐
今日のあなたのサポートが、私たちの明日への原動力で
⭐ 一つ一つのスターはクリエイターへの励みであり、より多くの人々がautoMateを発見し恩恵を受ける機会でもあります ⭐
今日のあなたのサポートが、私たちの明日への推進力となりま
</div>

85
install.py Normal file
View File

@ -0,0 +1,85 @@
import subprocess
import os
import sys
from util import download_weights
def check_cuda_version():
try:
# try to get cuda version from nvidia-smi
result = subprocess.run(['nvidia-smi'], capture_output=True, text=True)
for line in result.stdout.split('\n'):
if 'CUDA Version:' in line:
cuda_version = line.split('CUDA Version:')[1].strip()
return cuda_version
# try to get cuda version from nvcc
result = subprocess.run(['nvcc', '--version'], capture_output=True, text=True)
for line in result.stdout.split('\n'):
if 'release' in line:
version = line.split('V')[-1].split('.')[0:2]
return '.'.join(version)
return None
except:
return None
def install_pytorch():
cuda_version = check_cuda_version()
if cuda_version is None:
print("CUDA not found. Installing CPU version of PyTorch")
cmd = "pip install torch torchvision --index-url https://download.pytorch.org/whl/cpu --timeout 3000"
elif cuda_version.startswith("11."):
print(f"CUDA {cuda_version} found. Installing PyTorch for CUDA 11.8")
cmd = "pip install torch torchvision --index-url https://download.pytorch.org/whl/cu118 --timeout 3000"
elif cuda_version.startswith("12.4"):
print(f"CUDA {cuda_version} found. Installing PyTorch for CUDA 12.4")
cmd = "pip install torch torchvision --index-url https://download.pytorch.org/whl/cu124 --timeout 3000"
elif cuda_version.startswith("12.6"):
print(f"CUDA {cuda_version} found. Installing PyTorch for CUDA 12.6")
cmd = "pip install torch torchvision --index-url https://download.pytorch.org/whl/cu126 --timeout 3000"
else:
print(f"CUDA {cuda_version} found, but not in 11.8, 12.4, 12.6, please reinstall cuda and try again")
exit(1)
print(f"Running: {cmd}")
subprocess.run(cmd, shell=True)
def install_requirements():
# create a temporary requirements file, excluding torch and torchvision
with open('requirements.txt', 'r') as f:
requirements = f.readlines()
# filter out torch and torchvision
filtered_requirements = [req for req in requirements
if not req.strip().startswith('torch')
and not req.strip().startswith('torchvision')]
with open('temp_requirements.txt', 'w') as f:
f.writelines(filtered_requirements)
# install other dependencies
print("Installing other dependencies...")
subprocess.run([sys.executable, '-m', 'pip', 'install', '-r', 'temp_requirements.txt'])
# delete temporary file
os.remove('temp_requirements.txt')
def adjust_python_env():
# check if python is 3.12
if sys.version_info.major != 3 or sys.version_info.minor != 12:
print("Python version is not 3.12, please install python 3.12")
exit(1)
def install():
adjust_python_env()
install_pytorch()
install_requirements()
# download the weight files
download_weights.download()
print("Installation complete!")
if __name__ == "__main__":
install()
print("Installation complete!")

View File

@ -6,9 +6,6 @@ import torch
def run():
if not torch.cuda.is_available():
print("Warning: GPU is not available, we will use CPU, the application may run slower!\nyou computer will very likely heat up!")
print("Downloading the weight files...")
# download the weight files
download_weights.download()
app.run()

View File

@ -1,6 +1,6 @@
torch
# torch
# torchvision
easyocr
torchvision
supervision==0.18.0
transformers
ultralytics==8.3.70

View File

@ -1,11 +1,11 @@
import os
from pathlib import Path
from modelscope import snapshot_download
__WEIGHTS_DIR = Path("weights")
OMNI_PARSER_DIR = os.path.join(__WEIGHTS_DIR, "AI-ModelScope", "OmniParser-v2___0")
FLORENCE_DIR = os.path.join(__WEIGHTS_DIR, "AI-ModelScope", "Florence-2-base-ft")
def download():
from modelscope import snapshot_download
# Create weights directory
__WEIGHTS_DIR.mkdir(exist_ok=True)
snapshot_download(