Gradio快速部署构建AIGC的web应用 ,python
Gradio快速部署构建AIGC的web应用 ,python
Gradio开源项目链接:
https://github.com/gradio-app/gradiohttps://github.com/gradio-app/gradio
(1)python的pip安装:
pip install gradio
(2)写一段简单的demo示例python代码,引用Gradio包:
import gradio as grdef greet(name, intensity):return "Hello, " + name + "!" * int(intensity)demo = gr.Interface(fn=greet,inputs=["text", "slider"],outputs=["text"],
)demo.launch()
保存为.py代码文件,比如叫myapp.py
(3)python运行myapp.py:
python myapp.py
(3)如果前三步没什么问题,此时就可以打开浏览器,访问 127.0.0.1:7860
name中输入一个值,点击提交,output输出结果:
Windows安装docker,启动ollama运行open-webui使用AIGC大模型写周杰伦歌词-CSDN博客文章浏览阅读860次,点赞27次,收藏13次。webui-user.bat启动stable-diffusion-webui报错:RuntimeError: Torch is not able to use GPU,AIGC,Python。webui-user.bat启动stable-diffusion-webui报错:RuntimeError: Torch is not able to use GPU,AIGC,Python-CSDN博客。2、设置 - 系统 - 可选功能 - 更多Windows功能 - 启用或关闭Windows功能。https://blog.csdn.net/zhangphil/article/details/141829276