Skip to content

Commit

Permalink
修复onnxruntime问题
Browse files Browse the repository at this point in the history
  • Loading branch information
ZYX committed Jun 29, 2024
1 parent 02ff673 commit 323161a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
1 change: 1 addition & 0 deletions .github/workflows/pack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 3 additions & 4 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
numpy==1.26.0
opencv_python
PyAutoGUI
pywin32
Expand All @@ -8,8 +7,7 @@ pyuac
pillow
keyboard
requests
onnxruntime-directml
onnxruntime
onnxruntime-directml==1.17.3
shapely
pyclipper
pyscreeze==0.1.28
Expand All @@ -20,4 +18,5 @@ pyyaml
winotify
pystray
psutil
mss
mss
numpy==1.26.4
8 changes: 7 additions & 1 deletion utils/diver/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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:
Expand All @@ -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)
Expand Down
8 changes: 1 addition & 7 deletions utils/simul/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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']
Expand Down Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 323161a

Please sign in to comment.