
最近研究 stable-diffusion-webui ,开发了一个云推理的插件 https://github.com/omniinfer/sd-webui-cloud-inference
开发插件的过程中,发现 https://gradio.app/docs 这个框架写出来的代码很简洁,适合写 demo 程序。
1 Winrey 2023 年 7 月 10 日 但是到现在 gradio 对动态可变数量也没有什么好的组件 |
2 AnyISalIn OP @Winrey 嗯,这是一个比较大的问题,目前大家是通过一个手动 refresh button 来解决的,通过 js 定时 refresh 也可以解决部分问题。 |
3 alexapollo 2023 年 7 月 10 日 |
4 Betsy 2023 年 7 月 10 日 via iPhone Streamlit 呢? |
5 zhzy 2023 年 7 月 10 日 是挺方便,就是不太好看。 如果为了好看去改样式,好像又不是很合理... |
6 shic 2023 年 7 月 10 日 还有 nicegui ,pywebio |
7 akaHenry 2023 年 7 月 11 日 @shic python web gui 方案, 写 web app, 使用 docker 部署, 挺方便. 但是, 通病问题, 打包成 desktop app, 坑非常多. PyInstaller 之类的工具, 真的是一言难尽. 限制了英语场景. 之前尝试打包 nicegui, 包是打出来, 但是不 work, 也看不到报错 log. 而且还有内存泄露, 进程不停的崩溃+重开. 离谱. |
8 SoulMelody 2023 年 7 月 11 日 @akaHenry 可以试试 cx_Freeze ,除了不支持单文件模式,打个包还是不在话下的 |
9 akaHenry 2023 年 7 月 11 日 @SoulMelody 试了下 cx_Freeze, 确实打出来的包, 看起来正常多了. (包内容文件, 依赖似乎都在) https://github.com/better-py/learn-py/blob/main/packages/py-try/try-nicegui/build2.py#L61 我在 macOS 下, 用 cx_Freeze 打包 nicegui 示例. 不过打开还是会崩溃, 查到的崩溃 log 如下: nicegui 默认使用 fastapi 启动了 端口. (web 方式). 这里的报错, 是端口有问题. 感兴趣的话, 可以看我上面贴的链接, 是不是我的 build 配置参数有问题? "reportNotes" : [ "_dyld_process_info_create failed with 6", "dyld_process_snapshot_get_shared_cache failed", "Failed to create CSSymbolicatorRef - corpse still valid \\_(ツ)_\/", "thread_get_state(PAGEIN) returned 0x10000003: (ipc\/send) invalid destination port", "thread_get_state(EXCEPTION) returned 0x10000003: (ipc\/send) invalid destination port", "thread_get_state(FLAVOR) returned 0x10000003: (ipc\/send) invalid destination port" ] |
10 akaHenry 2023 年 7 月 11 日 打包脚本, 运行入口在这里: https://github.com/better-py/learn-py/blob/main/packages/py-try/try-nicegui/Taskfile.yml#L56 ``` poetry run python build2.py bdist_dmg ``` |
11 SoulMelody 2023 年 7 月 11 日 @akaHenry https://github.com/zauberzeug/nicegui/issues/355 看起来是 nicegui 打包运行时必须改成使用 reload=False |