Skip to content

Commit

Permalink
fix: wrong gradio version of webui (#205)
Browse files Browse the repository at this point in the history
* fix: wrong gradio version of webui

* feat: save qrcode image of gewechat
  • Loading branch information
hanfangyuan4396 authored Jan 16, 2025
1 parent 8cf2f48 commit 51e8b54
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ plugins/banwords/lib/__pycache__
!plugins/custom_dify_app
!plugins/group_at_autoreply
client_config.json
# qrcode
wx_qrcode.png

# auto coder
.auto-coder
Expand Down
2 changes: 1 addition & 1 deletion channel/wechat/wechat_channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ def qrCallback(uuid, status, qrcode):
try:
response = requests.get(item)
response.raise_for_status()
with open("wx_qrcode.png", "wb") as f:
with open("tmp/login.png", "wb") as f:
f.write(response.content)
break
except Exception as e:
Expand Down
2 changes: 0 additions & 2 deletions lib/gewechat/util/terminal_printer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,3 @@ def make_and_print_qr(url):
os.makedirs('tmp')
with open('tmp/login.png', 'wb') as f:
img.save(f)


4 changes: 2 additions & 2 deletions requirements-optional.txt
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ dingtalk_stream
zhipuai>=2.0.1

# webui
gradio==4.37.2
gradio_client==1.0.2
gradio==5.12.0
gradio_client==1.5.4
# tongyi qwen new sdk
dashscope
2 changes: 1 addition & 1 deletion web_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def start_run():
return f"重启成功!!"

def get_qrcode_image():
image_path = 'wx_qrcode.png'
image_path = 'tmp/login.png'
if os.path.exists(image_path):
return image_path
else:
Expand Down

0 comments on commit 51e8b54

Please sign in to comment.