diff --git a/.gitignore b/.gitignore index 6b8f540..6c9b832 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ weights** .conda** .venv -tmp** \ No newline at end of file +tmp** +build** +dist** \ No newline at end of file diff --git a/README.md b/README.md index 27cb646..76676fd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@
-autoMate logo +autoMate logo

autoMate

🤖 AI-powered Local Automation Tool | Make Your Computer Work For You

@@ -16,7 +16,7 @@ https://github.com/user-attachments/assets/bf27f8bd-136b-402e-bc7d-994b99bcc368 > 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.
-autoMate logo +autoMate logo
diff --git a/README_CN.md b/README_CN.md index b9ea5ad..7a81bd9 100644 --- a/README_CN.md +++ b/README_CN.md @@ -1,6 +1,6 @@
-autoMate logo +autoMate logo

autoMate

🤖 AI驱动的本地自动化工具 | 让电脑自己会干活

@@ -16,7 +16,7 @@ https://github.com/user-attachments/assets/bf27f8bd-136b-402e-bc7d-994b99bcc368 > 特别声明:autoMate 项目还处于非常早期阶段,当前更多用于学习。我们会不断的寻求突破点,不停地融入最新的技术!如果你有任何疑问,也可以加vx好友入群交流。
-autoMate logo +autoMate logo
diff --git a/README_JA.md b/README_JA.md index 1bcea1f..22149d1 100644 --- a/README_JA.md +++ b/README_JA.md @@ -1,6 +1,6 @@
-autoMate logo +autoMate logo

autoMate

🤖 AIで動くローカル自動化ツール | コンピューターに自ら仕事をさせる

@@ -16,7 +16,7 @@ https://github.com/user-attachments/assets/bf27f8bd-136b-402e-bc7d-994b99bcc368 > 特別声明:autoMateプロジェクトはまだ非常に初期段階にあり、現在は主に学習目的で使用されています。私たちは常にブレークスルーを求め、最新技術を取り入れています!質問がある場合は、WeChat友達追加してグループチャットに参加することもできます。
-autoMate logo +autoMate logo
diff --git a/resources/autoMate.png b/imgs/autoMate.png similarity index 100% rename from resources/autoMate.png rename to imgs/autoMate.png diff --git a/resources/cursor.png b/imgs/cursor.png similarity index 100% rename from resources/cursor.png rename to imgs/cursor.png diff --git a/imgs/demo_image.jpg b/imgs/demo_image.jpg deleted file mode 100644 index eee74c1..0000000 Binary files a/imgs/demo_image.jpg and /dev/null differ diff --git a/imgs/demo_image_som.jpg b/imgs/demo_image_som.jpg deleted file mode 100644 index 7f99769..0000000 Binary files a/imgs/demo_image_som.jpg and /dev/null differ diff --git a/imgs/excel.png b/imgs/excel.png deleted file mode 100644 index beb993b..0000000 Binary files a/imgs/excel.png and /dev/null differ diff --git a/imgs/google_page.png b/imgs/google_page.png deleted file mode 100644 index 69be492..0000000 Binary files a/imgs/google_page.png and /dev/null differ diff --git a/imgs/ios.png b/imgs/ios.png deleted file mode 100644 index 9c719ea..0000000 Binary files a/imgs/ios.png and /dev/null differ diff --git a/imgs/logo.png b/imgs/logo.png index 4fa33a4..a29477a 100644 Binary files a/imgs/logo.png and b/imgs/logo.png differ diff --git a/imgs/mobile.png b/imgs/mobile.png deleted file mode 100644 index b4e84db..0000000 Binary files a/imgs/mobile.png and /dev/null differ diff --git a/imgs/omni3.jpg b/imgs/omni3.jpg deleted file mode 100644 index 7dc70a6..0000000 Binary files a/imgs/omni3.jpg and /dev/null differ diff --git a/imgs/onenote.png b/imgs/onenote.png deleted file mode 100644 index 88aa519..0000000 Binary files a/imgs/onenote.png and /dev/null differ diff --git a/imgs/saved_image_demo.png b/imgs/saved_image_demo.png deleted file mode 100644 index 5db2fbc..0000000 Binary files a/imgs/saved_image_demo.png and /dev/null differ diff --git a/imgs/som_overlaid_omni.png b/imgs/som_overlaid_omni.png deleted file mode 100644 index 49271bc..0000000 Binary files a/imgs/som_overlaid_omni.png and /dev/null differ diff --git a/imgs/teams.png b/imgs/teams.png deleted file mode 100644 index a7e930d..0000000 Binary files a/imgs/teams.png and /dev/null differ diff --git a/imgs/windows.png b/imgs/windows.png deleted file mode 100644 index b8d5cfb..0000000 Binary files a/imgs/windows.png and /dev/null differ diff --git a/imgs/windows_home.png b/imgs/windows_home.png deleted file mode 100644 index 7c55985..0000000 Binary files a/imgs/windows_home.png and /dev/null differ diff --git a/imgs/windows_multitab.png b/imgs/windows_multitab.png deleted file mode 100644 index 5c920ce..0000000 Binary files a/imgs/windows_multitab.png and /dev/null differ diff --git a/imgs/windows_vm.png b/imgs/windows_vm.png deleted file mode 100644 index 2ad3f30..0000000 Binary files a/imgs/windows_vm.png and /dev/null differ diff --git a/imgs/word.png b/imgs/word.png deleted file mode 100644 index abde68a..0000000 Binary files a/imgs/word.png and /dev/null differ diff --git a/resources/wxchat.png b/imgs/wxchat.png similarity index 100% rename from resources/wxchat.png rename to imgs/wxchat.png diff --git a/main.py b/main.py index 22f3f59..fe706cf 100644 --- a/main.py +++ b/main.py @@ -1,11 +1,12 @@ from gradio_ui import app -from util import download_weights - import torch - +import os +from util import download_weights +os.environ["GRADIO_ANALYTICS_ENABLED"] = "False" 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!") + download_weights.download() app.run() diff --git a/main.spec b/main.spec new file mode 100644 index 0000000..f604b95 --- /dev/null +++ b/main.spec @@ -0,0 +1,59 @@ +# -*- mode: python ; coding: utf-8 -*- +from PyInstaller.utils.hooks import collect_data_files +import os +import shutil + +datas = [] +datas += collect_data_files('gradio_client') +datas += collect_data_files('gradio') +datas += collect_data_files('safehttpx') +datas += collect_data_files('groovy') +base_path = os.path.dirname(os.path.abspath('__file__')) +imgs_path = os.path.join(base_path, 'imgs') +datas += [(imgs_path, 'imgs')] + +a = Analysis( + ['main.py'], + pathex=[], + binaries=[], + datas=datas, + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + noarchive=False, + optimize=0, + module_collection_mode={ + 'gradio': 'py', + }, +) +pyz = PYZ(a.pure) + +exe = EXE( + pyz, + a.scripts, + [], + exclude_binaries=True, + name='main', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + console=True, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, +) +coll = COLLECT( + exe, + a.binaries, + a.datas, + strip=False, + upx=True, + upx_exclude=[], + name='main', +) + diff --git a/requirements.txt b/requirements.txt index 6cfd63c..43c1040 100644 --- a/requirements.txt +++ b/requirements.txt @@ -12,4 +12,5 @@ pyxbrain==1.1.31 timm einops==0.8.0 modelscope -pynput \ No newline at end of file +pynput +lap \ No newline at end of file diff --git a/resources/logo.png b/resources/logo.png deleted file mode 100644 index a29477a..0000000 Binary files a/resources/logo.png and /dev/null differ diff --git a/util/download_weights.py b/util/download_weights.py index e4e0b2d..8b7bd4c 100644 --- a/util/download_weights.py +++ b/util/download_weights.py @@ -10,6 +10,7 @@ def download(): snapshot_download( 'AI-ModelScope/OmniParser-v2.0', cache_dir='weights', + allow_file_pattern=['icon_detect/model.pt'] ) if __name__ == "__main__": diff --git a/util/tool.py b/util/tool.py index 9c88577..482aaaa 100644 --- a/util/tool.py +++ b/util/tool.py @@ -6,7 +6,7 @@ from io import BytesIO def capture_screen_with_cursor(): """Local function to capture the screen with cursor.""" - cursor_path = os.path.join(os.path.dirname(__file__),"..","resources", "cursor.png") + cursor_path = os.path.join(os.path.dirname(__file__),"..","imgs", "cursor.png") screenshot = pyautogui.screenshot() cursor_x, cursor_y = pyautogui.position() cursor = Image.open(cursor_path)