Code Monkey home page Code Monkey logo

gaizhenbiao / chuanhuchatgpt Goto Github PK

View Code? Open in Web Editor NEW
15.1K 85.0 2.3K 2.56 MB

GUI for ChatGPT API and many LLMs. Supports agents, file-based QA, GPT finetuning and query with web search. All with a neat UI.

Home Page: https://huggingface.co/spaces/JohnSmith9982/ChuanhuChatGPT

License: GNU General Public License v3.0

Python 66.16% Dockerfile 0.10% Batchfile 0.08% CSS 10.19% Shell 0.22% JavaScript 14.78% HTML 8.48%
chatbot chatgpt-api chatglm claude dalle3 ernie gemini gemma llama midjourney

chuanhuchatgpt's Introduction

简体中文 | English | 日本語 | Russian | 한국어

川虎 Chat 🐯 Chuanhu Chat

Logo

为ChatGPT等多种LLM提供了一个轻快好用的Web图形界面和众多附加功能

Tests Passing GitHub Contributors GitHub pull requests

支持 GPT-4 · 基于文件问答 · LLM本地部署 · 联网搜索 · Agent 助理 · 支持 Fine-tune

视频教程 · 2.0介绍视频 || 在线体验 · 一键部署

Chuanhu5.0.webm

目录

支持模型 使用技巧 安装方式 常见问题 给作者买可乐🥤 加入Telegram群组

✨ 5.0 重磅更新!

ChuanhuChat5更新

New! 全新的用户界面!精致得不像 Gradio,甚至有毛玻璃效果!

New! 适配了移动端(包括全面屏手机的挖孔/刘海),层级更加清晰。

New! 历史记录移到左侧,使用更加方便。并且支持搜索(支持正则)、删除、重命名。

New! 现在可以让大模型自动命名历史记录(需在设置或配置文件中开启)。

New! 现在可以将 川虎Chat 作为 PWA 应用程序安装,体验更加原生!支持 Chrome/Edge/Safari 等浏览器。

New! 图标适配各个平台,看起来更舒服。

New! 支持 Finetune(微调) GPT 3.5!

支持模型

API 调用模型 备注 本地部署模型 备注
ChatGPT(GPT-4、GPT-4o) 支持微调 gpt-3.5 ChatGLM (ChatGLM2) (ChatGLM3)
Azure OpenAI LLaMA 支持 Lora 模型 
Google Gemini Pro StableLM
讯飞星火认知大模型 MOSS
Inspur Yuan 1.0 通义千问
MiniMax
XMChat 不支持流式传输
Midjourney 不支持流式传输
Claude ✨ 现已支持Claude 3 Opus、Sonnet,Haiku将会在推出后的第一时间支持
DALL·E 3

使用技巧

💪 强力功能

  • 川虎助理:类似 AutoGPT,全自动解决你的问题;
  • 在线搜索:ChatGPT 的数据太旧?给 LLM 插上网络的翅膀;
  • 知识库:让 ChatGPT 帮你量子速读!根据文件回答问题。
  • 本地部署LLM:一键部署,获取属于你自己的大语言模型。
  • GPT 3.5微调:支持微调 GPT 3.5,让 ChatGPT 更加个性化。
  • 自定义模型:灵活地自定义模型,例如对接本地推理服务。

🤖 System Prompt

  • 通过 System Prompt 设定前提条件,可以很有效地进行角色扮演;
  • 川虎Chat 预设了Prompt模板,点击加载Prompt模板,先选择 Prompt 模板集合,然后在下方选择想要的 Prompt。

💬 基础对话

  • 如果回答不满意,可以使用 重新生成 按钮再试一次,或者直接 删除这轮对话;
  • 输入框支持换行,按 Shift + Enter即可;
  • 在输入框按 方向键,可以在发送记录中快速切换;
  • 每次新建一个对话太麻烦,试试 单论对话 功能;
  • 回答气泡旁边的小按钮,不仅能 一键复制,还能 查看Markdown原文
  • 指定回答语言,让 ChatGPT 固定以某种语言回答。

📜 对话历史

  • 对话历史记录会被自动保存,不用担心问完之后找不到了;
  • 多用户历史记录隔离,除了你都看不到;
  • 重命名历史记录,方便日后查找;
  • New! 魔法般自动命名历史记录,让 LLM 理解对话内容,帮你自动为历史记录命名!
  • New! 搜索历史记录,支持正则表达式!

🖼️ 小而美的体验

  • 自研 Small-and-Beautiful 主题,带给你小而美的体验;
  • 自动亮暗色切换,给你从早到晚的舒适体验;
  • 完美渲染 LaTeX / 表格 / 代码块,支持代码高亮;
  • New! 非线性动画、毛玻璃效果,精致得不像 Gradio!
  • New! 适配 Windows / macOS / Linux / iOS / Android,从图标到全面屏适配,给你最合适的体验!
  • New! 支持以 PWA应用程序 安装,体验更加原生!

👨‍💻 极客功能

  • New! 支持 Fine-tune(微调)gpt-3.5!
  • 大量 LLM 参数可调;
  • 支持更换 api-host;
  • 支持自定义代理;
  • 支持多 api-key 负载均衡。

⚒️ 部署相关

  • 部署到服务器:在 config.json 中设置 "server_name": "0.0.0.0", "server_port": <你的端口号>,
  • 获取公共链接:在 config.json 中设置 "share": true,。注意程序必须在运行,才能通过公共链接访问。
  • 在Hugging Face上使用:建议在右上角 复制Space 再使用,这样App反应可能会快一点。

快速上手

在终端执行以下命令:

git clone https://github.com/GaiZhenbiao/ChuanhuChatGPT.git
cd ChuanhuChatGPT
pip install -r requirements.txt

然后,在项目文件夹中复制一份 config_example.json,并将其重命名为 config.json,在其中填入 API-Key 等设置。

python ChuanhuChatbot.py

一个浏览器窗口将会自动打开,此时您将可以使用 川虎Chat 与ChatGPT或其他模型进行对话。

Note

具体详尽的安装教程和使用教程请查看本项目的wiki页面

疑难杂症解决

在遇到各种问题查阅相关信息前,您可以先尝试 手动拉取本项目的最新更改1更新依赖库2,然后重试。步骤为:

  1. 点击网页上的 Download ZIP 按钮,下载最新代码并解压覆盖,或
    git pull https://github.com/GaiZhenbiao/ChuanhuChatGPT.git main -f
  2. 尝试再次安装依赖(可能本项目引入了新的依赖)
    pip install -r requirements.txt
    

很多时候,这样就可以解决问题。

如果问题仍然存在,请查阅该页面:常见问题

该页面列出了几乎所有您可能遇到的各种问题,包括如何配置代理,以及遇到问题后您该采取的措施,请务必认真阅读

了解更多

若需了解更多信息,请查看我们的 wiki

Starchart

Star History Chart

Contributors

捐款

🐯如果觉得这个软件对你有所帮助,欢迎请作者喝可乐、喝咖啡~

联系作者:请去我的bilibili账号私信我。

Buy Me A Coffee

image

chuanhuchatgpt's People

Contributors

2p990i9hpral avatar binary-husky avatar chenhengjie123 avatar chinwh2019 avatar gaizhenbiao avatar hsungong avatar ihomesoft avatar ina111 avatar iskoldt-x avatar johnz03 avatar kavons avatar keldos-li avatar kilig947 avatar libukai avatar mzhao-ouo avatar noahzark avatar paradoxzw avatar pedrogruvhagen avatar plucury avatar qingxudw avatar redheartsecretman avatar slideslide avatar stingshen avatar toantranct avatar tusik avatar vc12345679 avatar xhongc avatar xingfanxia avatar xudongliu avatar yefori-go avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

chuanhuchatgpt's Issues

能否改成流式输出?

就是chatgpt边回复的时候边输出,不要等它回复完再一起显示,这样可以更快阅读到回复的内容,以及知道它是否卡住/卡死

代码里的中文引号问题

这个问题有点难搞,是个HTML/CSS问题。出于某种诡异的本地化考虑,"在系统语言为中文的浏览器上会显示为中文引号。

已解决:报错openai.error.APIConnectionError

返回错误信息:
raise error.APIConnectionError(
openai.error.APIConnectionError: Error communicating with OpenAI: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1131)')))

我试过更换API KEY、使用全局代理都显示这个错误。

Chatgpt说:该代码中使用了Python的raise语句来抛出APIConnectionError异常,这是一个自定义的异常类,表示与OpenAI API通讯时发生了错误。其中的错误信息包括了请求的URL地址以及导致错误的具体原因。从错误信息中可以看出,这个异常是由OpenAI API返回的,表明与该API的通讯过程中出现了SSLError(SSL错误)的异常,而具体的错误原因是违反了SSL协议。因此,这是一个由于与OpenAI API通讯时出现SSL连接问题而导致的异常。

api被墙了?

部署在阿里云华北服务器上,key认证一直过不去, 是api也被墙了吗?

ws连接超时

image
您好,我部署在了国外的vps上,启动后发现ws连接都是超时的,知道是啥情况吗

fail installing gradio

运行 pip install gradio --upgrade --force-reinstall 遇到错误,求解

Building wheels for collected packages: orjson
Building wheel for orjson (pyproject.toml) ... error
error: subprocess-exited-with-error

× Building wheel for orjson (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [1462 lines of output]
Running maturin pep517 build-wheel -i c:\users\woshi\appdata\local\programs\python\python38-32\python.exe --compatibility off --target i686-pc-windows-msvc
馃摝 Including license file "C:\Users\woshi\AppData\Local\Temp\pip-install-l8q22sjy\orjson_67485430601d4ac5858f65d14f071b31\LICENSE-APACHE"
馃摝 Including license file "C:\Users\woshi\AppData\Local\Temp\pip-install-l8q22sjy\orjson_67485430601d4ac5858f65d14f071b31\LICENSE-MIT"
馃嵐 Building a mixed python/rust project
馃敆 Found pyo3-ffi bindings
馃悕 Found CPython 3.8 at c:\users\woshi\appdata\local\programs\python\python38-32\python.exe
Compiling target-lexicon v0.12.6
Compiling autocfg v1.1.0
Compiling once_cell v1.17.1
Compiling serde v1.0.152
Compiling version_check v0.9.4
Compiling rustversion v1.0.11
Compiling libc v0.2.139
Compiling itoa v1.0.5
Compiling cfg-if v1.0.0
Compiling ryu v1.0.12
Compiling cc v1.0.79
Compiling serde_json v1.0.93
Compiling num-traits v0.2.15
error: could not compile cfg-if due to 3 previous errors
warning: build failed, waiting for other jobs to finish...
error: could not compile itoa due to 10 previous errors
error: could not compile ryu due to 39 previous errors
error: could not compile once_cell due to 145 previous errors
馃挜 maturin failed
Caused by: Failed to build a native library through cargo
Caused by: Cargo build finished with "exit code: 101": "cargo" "rustc" "--release" "--target" "i686-pc-windows-msvc" "--manifest-path" "C:\\Users\\woshi\\AppData\\Local\\Temp\\pip-install-l8q22sjy\\orjson_67485430601d4ac5858f65d14f071b31\\Cargo.toml" "--message-format" "json" "--lib"
error[E0463]: can't find crate for core
|
= note: the i686-pc-windows-msvc target may not be installed
= help: consider downloading the target with rustup target add i686-pc-windows-msvc

  error[E0463]: can't find crate for `compiler_builtins`


  error: aborting due to 2 previous errors


  For more information about this error, try `rustc --explain E0463`.

  error[E0463]: can't find crate for `core`
    |
    = note: the `i686-pc-windows-msvc` target may not be installed
    = help: consider downloading the target with `rustup target add i686-pc-windows-msvc`


  error[E0463]: can't find crate for `compiler_builtins`


  error[E0463]: can't find crate for `core`

请问怎么关闭服务

请问怎么合理的关闭服务,ctrl-C 会提示关闭中,再来一次看起来是退了,但是看起来会堵死,导致下次启动的时候报 getaddrinfo failed

请教如何加密码?

抱歉大佬,我确实是小白。
下载了py文件,本地修改好,cp到容器内,还是不行。
大佬的docker安装方法,能否加个目录映射。

感谢辛苦了。

更新脚本文件后,SSLError

下面是报错内容,麻烦up主了,谢谢您

chat_counter - 0
payload is - {'model': 'gpt-3.5-turbo', 'messages': [{'role': 'system', 'content': 'You are a helpful assistant.'}, {'role': 'user', 'content': '你好'}], 'temperature': 1, 'top_p': 1, 'n': 1, 'stream': True, 'presence_penalty': 0, 'frequency_penalty': 0}
Traceback (most recent call last):
  File "C:\Miniconda3\lib\site-packages\urllib3\connectionpool.py", line 696, in urlopen
    self._prepare_proxy(conn)
  File "C:\Miniconda3\lib\site-packages\urllib3\connectionpool.py", line 964, in _prepare_proxy
    conn.connect()
  File "C:\Miniconda3\lib\site-packages\urllib3\connection.py", line 364, in connect
    conn = self._connect_tls_proxy(hostname, conn)
  File "C:\Miniconda3\lib\site-packages\urllib3\connection.py", line 501, in _connect_tls_proxy
    socket = ssl_wrap_socket(
  File "C:\Miniconda3\lib\site-packages\urllib3\util\ssl_.py", line 453, in ssl_wrap_socket
    ssl_sock = _ssl_wrap_socket_impl(sock, context, tls_in_tls)
  File "C:\Miniconda3\lib\site-packages\urllib3\util\ssl_.py", line 495, in _ssl_wrap_socket_impl
    return ssl_context.wrap_socket(sock)
  File "C:\Miniconda3\lib\ssl.py", line 500, in wrap_socket
    return self.sslsocket_class._create(
  File "C:\Miniconda3\lib\ssl.py", line 1040, in _create
    self.do_handshake()
  File "C:\Miniconda3\lib\ssl.py", line 1309, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:1129)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Miniconda3\lib\site-packages\requests\adapters.py", line 440, in send
    resp = conn.urlopen(
  File "C:\Miniconda3\lib\site-packages\urllib3\connectionpool.py", line 755, in urlopen
    retries = retries.increment(
  File "C:\Miniconda3\lib\site-packages\urllib3\util\retry.py", line 574, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Miniconda3\lib\site-packages\gradio\routes.py", line 384, in run_predict
    output = await app.get_blocks().process_api(
  File "C:\Miniconda3\lib\site-packages\gradio\blocks.py", line 1032, in process_api
    result = await self.call_function(
  File "C:\Miniconda3\lib\site-packages\gradio\blocks.py", line 858, in call_function
    prediction = await anyio.to_thread.run_sync(
  File "C:\Miniconda3\lib\site-packages\anyio\to_thread.py", line 31, in run_sync
    return await get_asynclib().run_sync_in_worker_thread(
  File "C:\Miniconda3\lib\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
    return await future
  File "C:\Miniconda3\lib\site-packages\anyio\_backends\_asyncio.py", line 867, in run
    result = context.run(func, *args)
  File "C:\Miniconda3\lib\site-packages\gradio\utils.py", line 448, in async_iteration
    return next(iterator)
  File "D:\Desktop\ChuanhuChatGPT-main\ChuanhuChatbot.py", line 99, in predict
    response = requests.post(API_URL, headers=headers,
  File "C:\Miniconda3\lib\site-packages\requests\api.py", line 117, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "C:\Miniconda3\lib\site-packages\requests\api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "C:\Miniconda3\lib\site-packages\requests\sessions.py", line 529, in request
    resp = self.send(prep, **send_kwargs)
  File "C:\Miniconda3\lib\site-packages\requests\sessions.py", line 645, in send
    r = adapter.send(request, **kwargs)
  File "C:\Miniconda3\lib\site-packages\requests\adapters.py", line 517, in send
    raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='api.openai.com', port=443): Max retries exceeded with url: /v1/chat/completions (Caused by SSLError(SSLEOFError(8, 'EOF occurred in violation of protocol (_ssl.c:1129)')))

docker运行报错啥情况啊

docker: Error response from daemon: invalid volume specification: '/root/chatGPThistory:app/history': invalid mount config for type "bind": invalid mount path: 'app/history' mount path must be absolute.

生成大量 <br/> 标签

当第二次输入代码时,第一次对话的代码会自动加上非常多的
标签,然后超过token数,返回失败。

image

image

如何保存这次对话

在关闭网页之后,本次的对话就结束了,那么如何保存这次对话,让下次打开可以接着用呢?

如何用nginx反向代理

我想使用nginx反向代理到127.0.0.1:7860,不知道是不是我的nginx配置问题,访问后返回{"detail":"Not Found"},请问应该如何设置?

项目运行1天后请求gpt的api失败

提示:
image
重新运行项目后可以正常访问,看报错是openai.error.APIConnectionError: Error communicating with OpenAI: ('Connection aborted.', ConnectionResetError(10054, '远程主机强迫关闭了一个现有的连接。', None, 10054, None))

ubuntu采用新clone运行出现不回复情况

后端错误代码:
File "/usr/local/lib/python3.8/dist-packages/gradio/routes.py", line 384, in run_predict
output = await app.get_blocks().process_api(
File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 1032, in process_api
result = await self.call_function(
File "/usr/local/lib/python3.8/dist-packages/gradio/blocks.py", line 854, in call_function
raise ValueError("Need to enable queue to use generators.")
ValueError: Need to enable queue to use generators.
什么原因呢?
问了以下chatgpt说是enable_queue 没有设置为Ture也未能解决

It seems dialog saving is not working

Thanks for this project.

Everything seems to be functioning as expected, however, I am experiencing an issue with the save dialog. When I click on it, nothing happens. Interestingly, the loading dialog button works perfectly fine.

Just to keep you informed, I have been running the project using Docker, as I have been experiencing errors when attempting to run the project directly.

I have tried accessing the project on both Firefox and Chrome, and unfortunately, the issue persists on both browsers.

could not create share link

When I set demo.launch(share=True),the command line reminds me Could not create share link, please check your internet connection. However,My internet connection is fine,what sh
the problem
ould I do to solve this problem?

希望提供 docker-compose 部署方式

docker-compose 方便提供映射路径,将 API key、System prompt 和保留会话都保留在 NAS 硬盘存储。

另外,dockerhub 提示没有标签,不能直接通过群晖 Docker 下载。

建议在readme里加上urllib3版本问题的解决方法

因为这个问题重装了urllib3也没解决,后来在b站评论里看到说要装1.25.11版本的,才终于搞定,下面是原评论:

如果有人也出现了openai.error.APIConnectionError提示的报错,那可能是urllib3的版本导致的。urllib3版本大于1.25.11,就会出现这个问题。

解决方案是卸载urllib3然后重装至1.25.11版本再重新运行一遍就可以

在终端或命令提示符中卸载urllib3
pip uninstall urllib3

然后,您可以通过使用指定版本号的pip install命令来安装所需的版本:
pip install urllib3==1.25.11

一些关于显示的小bug,&lt;、&gt;、&nbsp;等异常显示

首先,十分感谢作者的开源,使我们可以更加方便的调用API。如下是部分代码:

def parse_text(text):
    lines = text.split("\n")
    for i,line in enumerate(lines):
        if "```" in line:
            items = line.split('`')
            if items[-1]:
                lines[i] = f'<pre><code class="{items[-1]}">'
            else:
                lines[i] = f'</code></pre>'
        else:
            if i > 0:
                line = line.replace("<", "&lt;")
                line = line.replace(">", "&gt;")
                lines[i] = '<br/>'+line.replace(" ", "&nbsp;")
    return "".join(lines)

关于上述代码,我发现在web中显示时,有时候会将符号<>转换为&lt;&gt;,空格显示转换为&nbsp;

1.这应该是由于chatGPT在给出回复时,```包裹的代码块中,HTML相关特殊字符部分是没有转义的,需要如上代码转义。但是非代码块部分,对于特殊字符,chatGPT的回复都会带上`,因此不应该对所有行的特殊字符进行替换,而是只替换代码块中的部分
2.我发现chatGPT的回复中,````包裹的代码块不一定会给出使用的语言(如c++),因此通过tems[-1]来判断是否会有问题?

如下是我更改后的代码,目前解决了我遇到的异常显示问题。

def parse_text(text):
    lines = text.split("\n")
    count = 0 // 用于判断'''符号是起始标志还是结束标志
    for i,line in enumerate(lines):
        if "```" in line:
            count += 1
            items = line.split('`')
            if count % 2 == 1:
                lines[i] = f'<pre><code class="{items[-1]}">'
            else:
                lines[i] = f'</code></pre>'
        else:
            if i > 0:
                if count % 2 == 1:
                    line = line.replace("&", "&amp;")
                    line = line.replace("\"", "&quot;")
                    line = line.replace("\'", "&apos;")
                    line = line.replace("<", "&lt;")
                    line = line.replace(">", "&gt;")
                    line = line.replace(" ", "&nbsp;")
                lines[i] = '<br/>'+line
    return "".join(lines)

如有错误请指正

请提供通过代理访问 openai 的功能

目前 openai 已经被墙了, 请提供 socks5/http 代理接口让程序走代理来访问 openai API

最好想 API key 一样 可以通过 代码/环境变量/网页等多种形式来输入代理地址

mac下使用docker无法启用share模式

问题描述

依赖冲突导致无法本地安装,使用了docker
但因为网络环境build不成功,我重新写了个dockerfile文件(换源,但针对arm处理器)。但是启动后发现,host模式不可用(docker不支持mac和win的host模式),只能使用端口转发。但是并不清楚share所使用的端口号,无法实现公网访问功能。
另外建议提供一个docker-compose.yml,方便将日志和聊天记录输出到挂载点。

环境

macbook m1
docker
dockerfile
”“” Dockerfile
FROM ubuntu:20.04
RUN sed -i 's/ports.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list
RUN sed -i 's/focal/jammy/g' /etc/apt/sources.list
RUN apt-get update && apt-get install -y python3 python3-pip build-essential
RUN pip config set global.index-url https://mirrors.aliyun.com/pypi/simple
RUN pip install openai gradio markdown
ENV PATH=/root/.local/bin:$PATH
COPY . /app
WORKDIR /app
ENV my_api_key empty
CMD ["python3", "-u", "ChuanhuChatbot.py", "2>&1", "|", "tee", "/var/log/application.log"]
“”“

输出

”“”
Running on local URL: http://0.0.0.0:80

Could not create share link. Please check your internet connection or our status page: https://status.gradio.app/
“”“

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.