uv与web-ui应用

首先要先安装python

pip install uv 

# 检测是否安装成功,出现版本号则成功

uv –version

先cd项目目录

uv venv 环境名 –python 3.11

#Activate the virtual environment:

#vs code  项目目录

activate

(#Windows (PowerShell):

Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass

.\Internlm\Scripts\Activate.ps1

#macOS

source Internlm/bin/activate)

web-ui的使用

首先安装git

git clone https://github.com/sanjion/Web-ui.git

cd web-ui

uv pip install -r requirements.txt 

playwright install –with-deps chromium

web-ui下有个.env.example文件,这是我们项目的启动配置,复制一份并重命名为 .env

# Windows (PowerShell):

cp .env.example .env

# macOS/Linux/Windows (PowerShell):

cp .env.example .env

运行 WebUI,完成上面的安装步骤后,启动应用程序:

python webui.py –ip 127.0.0.1 –port 7788

将gradio升级到最新版本即可解决

uv pip install –upgrade gradio  -i https://pypi.tuna.tsinghua.edu.cn/simple/

#缺相应包httpx[socks]安装就好了

uv pip install “httpx[socks]” -i https://pypi.tuna.tsinghua.edu.cn/simple/

发表评论