如何在渐变输入/输出之前添加标题或文本?

问题描述 投票:0回答:1

我在 MNIST 上做了一个机器学习项目并将其部署在 gradio 上。任何用户都不会理解他应该输入什么来使用该模型。所以我想在 gradio live 网站上添加标题或描述,以便任何人都可以理解。

我尝试使用gradio块,gradio.markdown,但它在Google colab上不起作用

machine-learning deployment mnist gradio
1个回答
0
投票

基础 gradio “Interface” 类具有参数(标题、描述和文章),这些参数采用字符串并呈现为应用程序的有用文本。这些是提供一些背景和说明的最简单方法。

例如:

title = "Awesome ML App"
desc = "This is an awesome ML App.  I'm really excited to show you"
long_desc = "Let me tell you ALL about this awesome ML App"
iface = gr.Interface(fn=classify_image, inputs=image, outputs=label, theme=gr.themes.Glass(), 
                examples=[example1, ref_example, example2], title=title, 
                description=desc, article=long_desc)
© www.soinside.com 2019 - 2024. All rights reserved.