3

通过图像和 ChatGPT 聊天

 1 year ago
source link: https://xugaoxiang.com/2023/03/19/visual-chatgpt/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
  • windows 10 64bit

最近微软开源了一个叫 visual-chatgpt 的项目,将大火的 chatgpt 和不同类型的视觉基础模型结合起来,以便在聊天过程中发送和接收图像。

ff857192ba37a518.webp

首先,创建一个全新的虚拟环境

conda create -n chatgpt python=3.8
conda activate chatgpt

然后拉取代码

git clone https://github.com/microsoft/visual-chatgpt.git
cd visual-chatgpt

# 安装所有项目依赖
pip install -r requirements.txt

鼠标右键点击 我的电脑,选择 属性,在左侧搜索栏里输入 环境,匹配 编辑系统环境变量

9711674af1c81c57.webp

点击 环境变量

1fd2fb0603fce7e8.webp

点击 新建(N)

91e9d21971fc6195.webp

变量名写上 OPENAI_API_KEY,变量值从 chatGPT 账号里获取,每个人不一样

6d5ae8116986246f.webp

然后,重新打开终端,这是为了让设置的环境变量生效,然后执行脚本

python visual_chatgpt.py

脚本会下载一堆的模型文件,慢慢等待吧,如果下载过程中断开,就重试

3fb41c44e7b741b5.webp

然后,打开浏览器,输入 http://127.0.0.1:7868

f7a3a9362ab421ae.webp

上传一张图片,然后开始对话吧

1bbb705dae1760ee.webp
0a22ace4e2a39c93.webp
dacecdf7aa8dd3b0.webp

需要注意的是,需要打开全局代理才可以使用,使用 clash 的朋友可以参考链接2。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK