Skip to content

Commit

Permalink
允许设置启动时是否自动打开浏览器 (#1010)
Browse files Browse the repository at this point in the history
* Update presets.py

添加增长后的3.5 turbo

* 修复了api-host在DALLE3中的问题

创建了IMAGES_COMPLETION_URL
大幅修改了DALLE3文件

* 允许设置启动时是否自动打开浏览器

增加了一个启动时是否自动打开浏览器的设置
  • Loading branch information
slideslide authored Jan 2, 2024
1 parent 5bffaf6 commit 8e2216a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion ChuanhuChatbot.py
Original file line number Diff line number Diff line change
Expand Up @@ -803,5 +803,5 @@ def create_greeting(request: gr.Request):
share=share,
auth=auth_from_conf if authflag else None,
favicon_path="./web_assets/favicon.ico",
inbrowser=not dockerflag, # 禁止在docker下开启inbrowser
inbrowser=autobrowser and not dockerflag, # 禁止在docker下开启inbrowser
)
2 changes: 2 additions & 0 deletions config_example.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,4 +82,6 @@
// "server_port": 7860,
// 如果要share到gradio,设置为true
// "share": false,
//如果不想自动打开浏览器,设置为false
//"autobrowser": false
}
2 changes: 2 additions & 0 deletions modules/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
"server_name",
"server_port",
"share",
"autobrowser",
"check_update",
"latex_delimiters_set",
"hide_history_when_not_logged_in",
Expand Down Expand Up @@ -299,6 +300,7 @@ def update_doc_config(two_column_pdf):
logging.error("你填写的默认模型" + default_model + "不存在!请从下面的列表中挑一个填写:" + str(presets.MODELS))

share = config.get("share", False)
autobrowser = config.get("autobrowser", True)

# avatar
bot_avatar = config.get("bot_avatar", "default")
Expand Down

0 comments on commit 8e2216a

Please sign in to comment.