gpt_academic
gpt_academic copied to clipboard
[Feature]: 一键脚本里pip_setup.py修改两行代码,就可以免去每次要输入的麻烦。
Class | 类型
None
Feature Request | 功能请求
https://github.com/binary-husky/gpt_academic/releases 这里下载的一键脚本, 安装完成后,正常使用期间, 每次点开,Windows双击这里运行.bat。都要输入1或2,之后又要输入enter。 不是很方便。 修改一下pip_setup.py里的两行, 50行改成。 choice = 2 74行注释掉。 # input(ready_msg)
以后再双击 Windows双击这里运行.bat 。就直接运行,弹出网页了。很省事。
这种自己改就好了,毕竟不是所有人都用国内镜像
一点小经验。 我用的时候,并不需要库都更新到最新,于是可以把这几行都注释掉。 这样就能快速开启网页,使用。
还有一个通义千问的坑。max是没有免费额度,一用就扣钱欠费,还导致turbo和plus不能用了, 所以别用qwenmax。
44行到59行。
def install_dependencies(): # Install the webui dependencies print('选择一种依赖安装方式:\n') print('1: 使用pypi官方\n') print('2: 使用阿里源\n') try: choice = int(input('\n输入1或2. 然后敲回车: ')) except: choice = 1 if choice == 1: run_cmd("python -m pip install -r requirements.txt --upgrade -i https://pypi.org/simple/", assert_success=True, environment=True) if choice == 2: run_cmd("python -m pip install -r requirements.txt --upgrade -i https://mirrors.aliyun.com/pypi/simple/", assert_success=True, environment=True) else: run_cmd("python -m pip install -r requirements.txt --upgrade -i https://pypi.org/simple/", assert_success=True, environment=True)
132行。 install_dependencies()