From 323161aa486b387803f1e29395b47fa107866ad8 Mon Sep 17 00:00:00 2001 From: ZYX Date: Sun, 30 Jun 2024 01:30:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Donnxruntime=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/pack.yml | 1 + requirements.txt | 7 +++---- utils/diver/config.py | 8 +++++++- utils/simul/config.py | 8 +------- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/pack.yml b/.github/workflows/pack.yml index 0fb5e18..fcc917d 100644 --- a/.github/workflows/pack.yml +++ b/.github/workflows/pack.yml @@ -34,6 +34,7 @@ jobs: run: python -m pip install --upgrade pip pip install -r requirements.txt + pip install numpy==1.26.4 - name: Pack Flet Application run: flet pack gui.py --icon imgs/icon_m.png --uac-admin --add-data "utils/models;utils/models" -y diff --git a/requirements.txt b/requirements.txt index 442094a..f75d52c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,3 @@ -numpy==1.26.0 opencv_python PyAutoGUI pywin32 @@ -8,8 +7,7 @@ pyuac pillow keyboard requests -onnxruntime-directml -onnxruntime +onnxruntime-directml==1.17.3 shapely pyclipper pyscreeze==0.1.28 @@ -20,4 +18,5 @@ pyyaml winotify pystray psutil -mss \ No newline at end of file +mss +numpy==1.26.4 \ No newline at end of file diff --git a/utils/diver/config.py b/utils/diver/config.py index 2e145a7..c2d91f5 100644 --- a/utils/diver/config.py +++ b/utils/diver/config.py @@ -24,6 +24,8 @@ def __init__(self): self.cpu_mode = 0 self.save_cnt = 4 self.accuracy = 1440 + self.enable_portal_prior = 0 + self.portal_prior = {'奖励':3, '事件':3, '战斗':2, '遭遇':2, '商店':1, '财富':1} self.team = '终结技' self.timezones = ['America', 'Asia', 'Europe', 'Default'] self.timezone = 'Default' @@ -79,6 +81,8 @@ def read(self): self.max_run = config['max_run'] self.save_cnt = config['save'] self.accuracy = config['accuracy'] + self.enable_portal_prior = config['enable_portal_prior'] + self.portal_prior = config['portal_prior'] except: pass with open(os.path.join(self.abspath, self.text), "r", encoding="utf-8", errors='ignore') as f: @@ -102,7 +106,9 @@ def save(self): "save": self.save_cnt, "timezone": self.timezone, "max_run": self.max_run, - "accuracy": self.accuracy + "accuracy": self.accuracy, + "enable_portal_prior": self.enable_portal_prior, + "portal_prior": self.portal_prior }, "key_mapping": self.mapping }, f, allow_unicode=True, sort_keys=False) diff --git a/utils/simul/config.py b/utils/simul/config.py index 4d65cdf..130ffe1 100644 --- a/utils/simul/config.py +++ b/utils/simul/config.py @@ -26,8 +26,6 @@ def __init__(self): self.force_update = 0 self.unlock = 0 self.bonus = 0 - self.enable_portal_prior = 0 - self.portal_prior = {'奖励':3, '事件':3, '战斗':2, '遭遇':2, '商店':1, '财富':1} self.timezones = ['America', 'Asia', 'Europe', 'Default'] self.timezone = 'Default' self.origin_key = ['f','m','shift','v','e','w','a','s','d','1','2','3','4'] @@ -74,8 +72,6 @@ def read(self): self.timezone = config['timezone'] self.slow_mode = config['slow_mode'] self.max_run = config['max_run'] - self.enable_portal_prior = config['enable_portal_prior'] - self.portal_prior = config['portal_prior'] except: pass with open(os.path.join(self.abspath, self.text), "r", encoding="utf-8", errors='ignore') as f: @@ -165,9 +161,7 @@ def save(self): "slow_mode": self.slow_mode, "force_update": self.force_update, "timezone": self.timezone, - "max_run": self.max_run, - "enable_portal_prior": self.enable_portal_prior, - "portal_prior": self.portal_prior + "max_run": self.max_run }, "prior": prior, "key_mapping": self.mapping