WebGUI之Gradio:Gradio 5的简介、安装和使用方法、案例应用之详细攻略
WebGUI之Gradio:Gradio 5的简介、安装和使用方法、案例应用之详细攻略
目录
Gradio 5的简介
1、Gradio的适用场景
2、Gradio 5 的主要改进包括:
Gradio 5的安装和使用方法
1、安装和使用方法
2、使用方法
2.1、文本内容
(1)、简单的输入/输出组件—“Hello World”示例
(2)、多输入和输出组件
2.2、一个图像示例
2.3、一个应用程序来感受一下Blocks更多的可能
Gradio 5的案例应用
1、基础用法
(1)、深度预测模型DepthPro
(2)、转录音频Whisper Large V3 Turbo
(3)、chatbot_streaming
(4)、scatter_plot_demo
Gradio 5的简介
Gradio 是一个开源 Python 软件包,可让您快速为机器学习模型、API 或任意 Python 函数构建演示或 Web 应用程序。然后,您只需几秒钟即可使用 Gradio 的内置共享功能分享您的演示或 Web 应用程序的链接。无需 JavaScript、CSS 或 Web 托管经验!与其他人共享机器学习模型、API 或数据科学工作的最佳方法之一就是创建一个交互式应用程序,让用户或同事在他们的浏览器中进行实验。Gradio 让你可以用 Python 构建演示并分享它们,而且通常只需几行代码!
Gradio是一个开源的Python库,用于构建演示机器学习或数据科学,以及网络应用程序。使用Gradio,您可以根据您的机器学习模型或数据科学工作流程快速创建一个漂亮的用户界面,让用户可以“尝试”拖放自己的图像、粘贴文本、记录自己的声音,并通过浏览器与您的演示程序进行交互。
2024年10月9日,HuggingFace重磅发布Gradio 5,它是一个用于构建生产就绪型机器学习Web应用程序的框架。它旨在解决Gradio开发者在构建生产环境应用时遇到的常见痛点,例如加载速度慢、设计老旧、缺乏实时应用支持以及与大型语言模型(LLM)的集成问题。
Gradio 5 是一个功能强大且易于使用的框架,可以帮助开发者快速构建高质量的机器学习Web应用程序。其改进的性能、现代化的设计以及增强的功能使其成为构建生产环境机器学习应用的理想选择。
文章地址:https://huggingface.co/blog/gradio-5
官网地址:Gradio
GitHub地址:GitHub - gradio-app/gradio: Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
1、Gradio的适用场景
Gradio适用于:
>> 向客户/合伙人/用户/学生演示您的机器学习模型。
>> 通过自动共享链接快速配置您的模型,并获得模型反馈。
>> 在开发过程中使用内置的操作和解释工具吸引地调试模型。
2、Gradio 5 的主要改进包括:
>> 性能提升: 通过服务器端渲染 (SSR) 等技术显著提升了应用加载速度,几乎消除了加载等待时间。
>> 现代化设计: 更新了核心组件(按钮、标签、滑块、聊天机器人界面等)的设计,并提供了一套新的内置主题,使应用界面更现代美观。
>> 实时应用支持: 实现了低延迟流式传输,支持通过base64编码和WebSockets进行加速,支持WebRTC,并提供了更多关于常见流式用例(如基于网络摄像头的目标检测、视频流、实时语音转录和生成以及对话式聊天机器人)的文档和示例。
>> 与LLM集成: 提供了一个实验性的AI Playground,允许用户使用AI生成或修改Gradio应用程序,并在浏览器中立即预览。
>> 增强安全性: 进行了全面的安全改进,并进行了第三方安全审计(更多细节将在后续文章中发布)。
>> 保持简单易用的API: 在提供强大功能的同时,Gradio 5 依然保持了简单直观的开发者API。
Gradio 5的安装和使用方法
1、安装和使用方法
安装Gradio 5非常简单,只需在终端输入以下命令:
pip install --upgrade gradio
pip install -i https://mirrors.aliyun.com/pypi/simple --upgrade gradio
C:\Windows\System32>pip install -i https://mirrors.aliyun.com/pypi/simple --upgrade gradio
Looking in indexes: https://mirrors.aliyun.com/pypi/simple
Collecting gradio
Downloading https://mirrors.aliyun.com/pypi/packages/3f/6e/c0726e138f64cd98379a7bf95f4f3b15dd5a9f004b172540cee5653ec820/gradio-4.44.1-py3-none-any.whl (18.1 MB)
---------------------------------------- 18.1/18.1 MB 8.6 MB/s eta 0:00:00
Collecting aiofiles<24.0,>=22.0 (from gradio)
Downloading https://mirrors.aliyun.com/pypi/packages/c5/19/5af6804c4cc0fed83f47bff6e413a98a36618e7d40185cd36e69737f3b0e/aiofiles-23.2.1-py3-none-any.whl (15 kB)
Requirement already satisfied: anyio<5.0,>=3.0 in d:\programdata\anaconda3\lib\site-packages (from gradio) (3.7.1)
Requirement already satisfied: fastapi<1.0 in d:\programdata\anaconda3\lib\site-packages (from gradio) (0.103.2)
Collecting ffmpy (from gradio)
Downloading https://mirrors.aliyun.com/pypi/packages/ff/1e/db99aa669eee301966bc6c997d60a0240f9cecae63f044b2e5a5310e4bf7/ffmpy-0.4.0-py3-none-any.whl (5.8 kB)
Collecting gradio-client==1.3.0 (from gradio)
Downloading https://mirrors.aliyun.com/pypi/packages/de/fe/7e9cb4d0e6aa74268fa31089189e4855882a0f2a36c45d359336946d4ae1/gradio_client-1.3.0-py3-none-any.whl (318 kB)
---------------------------------------- 318.7/318.7 kB 20.6 MB/s eta 0:00:00
Requirement already satisfied: httpx>=0.24.1 in d:\programdata\anaconda3\lib\site-packages (from gradio) (0.24.1)
Collecting huggingface-hub>=0.19.3 (from gradio)
Downloading https://mirrors.aliyun.com/pypi/packages/60/bf/cea0b9720c32fa01b0c4ec4b16b9f4ae34ca106b202ebbae9f03ab98cd8f/huggingface_hub-0.26.2-py3-none-any.whl (447 kB)
---------------------------------------- 447.5/447.5 kB 14.1 MB/s eta 0:00:00
Requirement already satisfied: importlib-resources<7.0,>=1.3 in d:\programdata\anaconda3\lib\site-packages (from gradio) (6.1.2)
Requirement already satisfied: jinja2<4.0 in d:\programdata\anaconda3\lib\site-packages (from gradio) (3.1.2)
Requirement already satisfied: markupsafe~=2.0 in d:\programdata\anaconda3\lib\site-packages (from gradio) (2.1.3)
Requirement already satisfied: matplotlib~=3.0 in d:\programdata\anaconda3\lib\site-packages (from gradio) (3.8.0)
Requirement already satisfied: numpy<3.0,>=1.0 in d:\programdata\anaconda3\lib\site-packages (from gradio) (1.24.4)
Requirement already satisfied: orjson~=3.0 in d:\programdata\anaconda3\lib\site-packages (from gradio) (3.10.0)
Requirement already satisfied: packaging in d:\programdata\anaconda3\lib\site-packages (from gradio) (23.2)
Requirement already satisfied: pandas<3.0,>=1.0 in d:\programdata\anaconda3\lib\site-packages (from gradio) (1.5.3)
Requirement already satisfied: pillow<11.0,>=8.0 in d:\programdata\anaconda3\lib\site-packages (from gradio) (10.2.0)
Collecting pydantic>=2.0 (from gradio)
Downloading https://mirrors.aliyun.com/pypi/packages/df/e4/ba44652d562cbf0bf320e0f3810206149c8a4e99cdbf66da82e97ab53a15/pydantic-2.9.2-py3-none-any.whl (434 kB)
---------------------------------------- 434.9/434.9 kB 6.8 MB/s eta 0:00:00
Collecting pydub (from gradio)
Downloading https://mirrors.aliyun.com/pypi/packages/a6/53/d78dc063216e62fc55f6b2eebb447f6a4b0a59f55c8406376f76bf959b08/pydub-0.25.1-py2.py3-none-any.whl (32 kB)
Collecting python-multipart>=0.0.9 (from gradio)
Downloading https://mirrors.aliyun.com/pypi/packages/b4/fb/275137a799169392f1fa88fff2be92f16eee38e982720a8aaadefc4a36b2/python_multipart-0.0.17-py3-none-any.whl (24 kB)
Requirement already satisfied: pyyaml<7.0,>=5.0 in d:\programdata\anaconda3\lib\site-packages (from gradio) (6.0.1)
Collecting ruff>=0.2.2 (from gradio)
Downloading https://mirrors.aliyun.com/pypi/packages/d9/18/c4b00d161def43fe5968e959039c8f6ce60dca762cec4a34e4e83a4210a0/ruff-0.7.2-py3-none-win_amd64.whl (9.4 MB)
---------------------------------------- 9.4/9.4 MB 8.9 MB/s eta 0:00:00
Collecting semantic-version~=2.0 (from gradio)
Downloading https://mirrors.aliyun.com/pypi/packages/6a/23/8146aad7d88f4fcb3a6218f41a60f6c2d4e3a72de72da1825dc7c8f7877c/semantic_version-2.10.0-py2.py3-none-any.whl (15 kB)
Collecting tomlkit==0.12.0 (from gradio)
Downloading https://mirrors.aliyun.com/pypi/packages/68/4f/12207897848a653d03ebbf6775a29d949408ded5f99b2d87198bc5c93508/tomlkit-0.12.0-py3-none-any.whl (37 kB)
Collecting typer<1.0,>=0.12 (from gradio)
Downloading https://mirrors.aliyun.com/pypi/packages/a8/2b/886d13e742e514f704c33c4caa7df0f3b89e5a25ef8db02aa9ca3d9535d5/typer-0.12.5-py3-none-any.whl (47 kB)
---------------------------------------- 47.3/47.3 kB 2.5 MB/s eta 0:00:00
Requirement already satisfied: typing-extensions~=4.0 in d:\programdata\anaconda3\lib\site-packages (from gradio) (4.8.0)
Requirement already satisfied: urllib3~=2.0 in d:\programdata\anaconda3\lib\site-packages (from gradio) (2.0.5)
Requirement already satisfied: uvicorn>=0.14.0 in d:\programdata\anaconda3\lib\site-packages (from gradio) (0.23.2)
Requirement already satisfied: fsspec in d:\programdata\anaconda3\lib\site-packages (from gradio-client==1.3.0->gradio) (2023.9.1)
Requirement already satisfied: websockets<13.0,>=10.0 in d:\programdata\anaconda3\lib\site-packages (from gradio-client==1.3.0->gradio) (11.0.3)
Requirement already satisfied: idna>=2.8 in d:\programdata\anaconda3\lib\site-packages (from anyio<5.0,>=3.0->gradio) (3.4)
Requirement already satisfied: sniffio>=1.1 in d:\programdata\anaconda3\lib\site-packages (from anyio<5.0,>=3.0->gradio) (1.2.0)
Requirement already satisfied: exceptiongroup in d:\programdata\anaconda3\lib\site-packages (from anyio<5.0,>=3.0->gradio) (1.1.3)
Requirement already satisfied: starlette<0.28.0,>=0.27.0 in d:\programdata\anaconda3\lib\site-packages (from fastapi<1.0->gradio) (0.27.0)
Requirement already satisfied: certifi in d:\programdata\anaconda3\lib\site-packages (from httpx>=0.24.1->gradio) (2023.7.22)
Requirement already satisfied: httpcore<0.18.0,>=0.15.0 in d:\programdata\anaconda3\lib\site-packages (from httpx>=0.24.1->gradio) (0.17.3)
Requirement already satisfied: filelock in d:\programdata\anaconda3\lib\site-packages (from huggingface-hub>=0.19.3->gradio) (3.12.4)
Requirement already satisfied: requests in d:\programdata\anaconda3\lib\site-packages (from huggingface-hub>=0.19.3->gradio) (2.31.0)
Requirement already satisfied: tqdm>=4.42.1 in d:\programdata\anaconda3\lib\site-packages (from huggingface-hub>=0.19.3->gradio) (4.66.1)
Requirement already satisfied: zipp>=3.1.0 in d:\programdata\anaconda3\lib\site-packages (from importlib-resources<7.0,>=1.3->gradio) (3.7.0)
Requirement already satisfied: contourpy>=1.0.1 in d:\programdata\anaconda3\lib\site-packages (from matplotlib~=3.0->gradio) (1.1.1)
Requirement already satisfied: cycler>=0.10 in d:\programdata\anaconda3\lib\site-packages (from matplotlib~=3.0->gradio) (0.11.0)
Requirement already satisfied: fonttools>=4.22.0 in d:\programdata\anaconda3\lib\site-packages (from matplotlib~=3.0->gradio) (4.42.1)
Requirement already satisfied: kiwisolver>=1.0.1 in d:\programdata\anaconda3\lib\site-packages (from matplotlib~=3.0->gradio) (1.4.5)
Requirement already satisfied: pyparsing>=2.3.1 in d:\programdata\anaconda3\lib\site-packages (from matplotlib~=3.0->gradio) (3.1.1)
Requirement already satisfied: python-dateutil>=2.7 in d:\programdata\anaconda3\lib\site-packages (from matplotlib~=3.0->gradio) (2.8.2)
Requirement already satisfied: pytz>=2020.1 in d:\programdata\anaconda3\lib\site-packages (from pandas<3.0,>=1.0->gradio) (2023.3.post1)
Requirement already satisfied: annotated-types>=0.6.0 in d:\programdata\anaconda3\lib\site-packages (from pydantic>=2.0->gradio) (0.6.0)
Collecting pydantic-core==2.23.4 (from pydantic>=2.0->gradio)
Downloading https://mirrors.aliyun.com/pypi/packages/98/95/dd7045c4caa2b73d0bf3b989d66b23cfbb7a0ef14ce99db15677a000a953/pydantic_core-2.23.4-cp39-none-win_amd64.whl (1.9 MB)
---------------------------------------- 1.9/1.9 MB 9.4 MB/s eta 0:00:00
Collecting click>=8.0.0 (from typer<1.0,>=0.12->gradio)
Downloading https://mirrors.aliyun.com/pypi/packages/00/2e/d53fa4befbf2cfa713304affc7ca780ce4fc1fd8710527771b58311a3229/click-8.1.7-py3-none-any.whl (97 kB)
---------------------------------------- 97.9/97.9 kB 5.5 MB/s eta 0:00:00
Requirement already satisfied: shellingham>=1.3.0 in d:\programdata\anaconda3\lib\site-packages (from typer<1.0,>=0.12->gradio) (1.5.1)
Requirement already satisfied: rich>=10.11.0 in d:\programdata\anaconda3\lib\site-packages (from typer<1.0,>=0.12->gradio) (12.4.4)
Requirement already satisfied: h11>=0.8 in d:\programdata\anaconda3\lib\site-packages (from uvicorn>=0.14.0->gradio) (0.14.0)
Requirement already satisfied: colorama in d:\programdata\anaconda3\lib\site-packages (from click>=8.0.0->typer<1.0,>=0.12->gradio) (0.4.6)
Requirement already satisfied: six>=1.5 in d:\programdata\anaconda3\lib\site-packages (from python-dateutil>=2.7->matplotlib~=3.0->gradio) (1.16.0)
Requirement already satisfied: commonmark<0.10.0,>=0.9.0 in d:\programdata\anaconda3\lib\site-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (0.9.1)
Requirement already satisfied: pygments<3.0.0,>=2.6.0 in d:\programdata\anaconda3\lib\site-packages (from rich>=10.11.0->typer<1.0,>=0.12->gradio) (2.16.1)
Requirement already satisfied: charset-normalizer<4,>=2 in d:\programdata\anaconda3\lib\site-packages (from requests->huggingface-hub>=0.19.3->gradio) (3.2.0)
Installing collected packages: pydub, tomlkit, semantic-version, ruff, python-multipart, pydantic-core, ffmpy, click, aiofiles, typer, pydantic, huggingface-hub, gradio-client, gradio
Attempting uninstall: tomlkit
Found existing installation: tomlkit 0.12.3
Uninstalling tomlkit-0.12.3:
Successfully uninstalled tomlkit-0.12.3
Attempting uninstall: python-multipart
Found existing installation: python-multipart 0.0.6
Uninstalling python-multipart-0.0.6:
Successfully uninstalled python-multipart-0.0.6
Attempting uninstall: pydantic-core
Found existing installation: pydantic_core 2.16.2
Uninstalling pydantic_core-2.16.2:
Successfully uninstalled pydantic_core-2.16.2
Attempting uninstall: click
Found existing installation: click 7.1.2
Uninstalling click-7.1.2:
Successfully uninstalled click-7.1.2
Attempting uninstall: typer
Found existing installation: typer 0.3.2
Uninstalling typer-0.3.2:
Successfully uninstalled typer-0.3.2
Attempting uninstall: pydantic
Found existing installation: pydantic 1.10.15
Uninstalling pydantic-1.10.15:
Successfully uninstalled pydantic-1.10.15
Attempting uninstall: huggingface-hub
Found existing installation: huggingface-hub 0.17.2
Uninstalling huggingface-hub-0.17.2:
Successfully uninstalled huggingface-hub-0.17.2
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
spyder 5.1.5 requires pyqt5<5.13, which is not installed.
spyder 5.1.5 requires pyqtwebengine<5.13, which is not installed.
confection 0.0.4 requires pydantic!=1.8,!=1.8.1,<1.11.0,>=1.7.4, but you have pydantic 2.9.2 which is incompatible.
langchain-openai 0.1.6 requires langchain-core<0.2.0,>=0.1.46, but you have langchain-core 0.2.10 which is incompatible.
pyqt6-plugins 6.4.2.2.3 requires pyqt6==6.4.2, but you have pyqt6 6.6.0 which is incompatible.
pyqt6-plugins 6.4.2.2.3 requires pyqt6-qt6==6.4.3, but you have pyqt6-qt6 6.6.0 which is incompatible.
pyqt6-tools 6.4.2.3.3 requires pyqt6==6.4.2, but you have pyqt6 6.6.0 which is incompatible.
spacy 3.7.4 requires typer<0.10.0,>=0.3.0, but you have typer 0.12.5 which is incompatible.
spacy-transformers 1.2.3 requires transformers<4.29.0,>=3.4.0, but you have transformers 4.33.2 which is incompatible.
spyder 5.1.5 requires jedi<0.19.0,>=0.17.2, but you have jedi 0.19.0 which is incompatible.
streamlit 1.24.0 requires importlib-metadata<7,>=1.4, but you have importlib-metadata 7.0.1 which is incompatible.
streamlit 1.24.0 requires pillow<10,>=6.2.0, but you have pillow 10.2.0 which is incompatible.
syft 0.8.2 requires networkx==2.8, but you have networkx 3.1 which is incompatible.
syft 0.8.2 requires pydantic[email]==1.10.13, but you have pydantic 2.9.2 which is incompatible.
syft 0.8.2 requires safetensors==0.4.0, but you have safetensors 0.3.3 which is incompatible.
syft 0.8.2 requires torch[cpu]==2.1.0, but you have torch 2.0.1 which is incompatible.
syft 0.8.2 requires transformers==4.34.0, but you have transformers 4.33.2 which is incompatible.
syft 0.8.2 requires typeguard==2.13.3, but you have typeguard 4.1.5 which is incompatible.
weasel 0.3.4 requires typer<0.10.0,>=0.3.0, but you have typer 0.12.5 which is incompatible.
xport 3.6.1 requires pandas<1.4,>=1.3.5, but you have pandas 1.5.3 which is incompatible.
Successfully installed aiofiles-23.2.1 click-8.1.7 ffmpy-0.4.0 gradio-4.44.1 gradio-client-1.3.0 huggingface-hub-0.26.2 pydantic-2.9.2 pydantic-core-2.23.4 pydub-0.25.1 python-multipart-0.0.17 ruff-0.7.2 semantic-version-2.10.0 tomlkit-0.12.0 typer-0.12.5
2、使用方法
安装完成后,即可开始构建你的第一个Gradio应用程序。
2.1、文本内容
(1)、简单的输入/输出组件—“Hello World”示例
在运行示例时我们创建了一个gradio.Interface
。Interface
类可以使用用户接口包装各自的Python函数。在上面的示例中,我们使用了一个基于文本的简单函数,但这个函数可以是任何东西,从音乐生成器到计算器,再到预训练机器学习模型的预测函数。
Interface
类核心需要三个参数初始化:
fn
: 被UI包装的函数inputs
:作为输入的组件(例如:"text"
,"image"
或"audio"
)outputs
: 作为输出的组件(例如:"text"
,"image"
或"label"
)
两段代码的区别
- 代码案例 01 使用了
inputs="text"
,这是一个简化的方式,只使用文本输入框。 - 代码案例 02 使用了
gr.Textbox
,可以自定义输入框的样式和行为,如设置行数和占位符。
########代码案例01#########
import gradio as gr
def greet(name):
return "Hello " + name + "!"
demo = gr.Interface(fn=greet, inputs="text", outputs="text")
demo.launch()
########代码案例02#########
# 假设您想要自定义输入文本字段,例如您希望它更大并有一个文本占位符。如果我们使用Textbox的实际类,而不是使用字符串快捷方式,就可以通过组件属性实现个性化。
import gradio as gr
def greet(name):
return "Hello " + name + "!"
demo = gr.Interface(
fn=greet,
inputs=gr.Textbox(lines=2, placeholder="Name Here..."),
outputs="text",
)
demo.launch()
(2)、多输入和输出组件
import gradio as gr
def greet(name, is_morning, temperature):
salutation = "Good morning" if is_morning else "Good evening"
greeting = f"{salutation} {name}. It is {temperature} degrees today"
celsius = (temperature - 32) * 5 / 9
return greeting, round(celsius, 2)
demo = gr.Interface(
fn=greet,
inputs=["text", "checkbox", gr.Slider(0, 100)],
outputs=["text", "number"],
)
demo.launch()
2.2、一个图像示例
Gradio支持多种类型的组件,如Image
、、或。让我们尝试一个图像到图像的函数来感受一下!DateFrame
VideoLabel。
当使用Image
组件作为输入时,您的函数将接收一个形状为(height, width, 3)
NumPy 返回的阵列,其中最后一个维度表示 RGB 值。我们以 NumPy 阵列的形式接收一张图像。也可以使用type=
关键字参数设置组件使用的数据类型。例如,如果您想让您的函数获取一个图像的文件路径,而不是一个 NumPy 数据库时,输入Image
组件可以写成:gr.Image(type="filepath")
还要注意,我们的输入Image
组件带有一个编辑按钮🖉,它允许放大和放大图像。这种方式操作图像可以帮助揭示机器学习模型中的偏差或隐藏的缺陷!
import numpy as np
import gradio as gr
def sepia(input_img):
sepia_filter = np.array([
[0.393, 0.769, 0.189],
[0.349, 0.686, 0.168],
[0.272, 0.534, 0.131]
])
sepia_img = input_img.dot(sepia_filter.T)
sepia_img /= sepia_img.max()
return sepia_img
demo = gr.Interface(sepia, gr.Image(), "image")
demo.launch()
2.3、一个应用程序来感受一下Blocks
更多的可能
import numpy as np
import gradio as gr
def flip_text(x):
return x[::-1]
def flip_image(x):
return np.fliplr(x)
with gr.Blocks() as demo:
gr.Markdown("Flip text or image files using this demo.")
with gr.Tabs():
with gr.TabItem("Flip Text"):
text_input = gr.Textbox()
text_output = gr.Textbox()
text_button = gr.Button("Flip")
with gr.TabItem("Flip Image"):
with gr.Row():
image_input = gr.Image()
image_output = gr.Image()
image_button = gr.Button("Flip")
text_button.click(flip_text, inputs=text_input, outputs=text_output)
image_button.click(flip_image, inputs=image_input, outputs=image_output)
demo.launch()
Gradio 5的案例应用
1、基础用法
文章中列举了几个使用Gradio 5 的Hugging Face Spaces示例:这些例子展示了Gradio 5在不同机器学习应用场景中的应用,例如深度估计、语音转录、流式聊天机器人和散点图演示。 文章还提到Gradio 5 未来将支持更多功能,例如多页面应用、移动端支持、更多媒体组件以及与机器学习模型和API提供商的一键式集成等。
(1)、深度预测模型DepthPro
测试地址:https://huggingface.co/spaces/akhaliq/depth-pro
DepthPro 是一款快速的深度预测模型。只需上传一张图片即可预测其深度图和焦距。对于较大的图片,系统会自动将其缩放到1536x1536像素。
(2)、转录音频Whisper Large V3 Turbo
测试地址:https://huggingface.co/spaces/hf-audio/whisper-large-v3-turbo
“Whisper Large V3 Turbo:转录音频”:只需点击一下按钮即可转录麦克风或音频输入的长篇内容!演示使用了OpenAI的checkpoint openai/whisper-large-v3-turbo和🤗 Transformers来转录任意长度的音频文件。
(3)、chatbot_streaming
测试地址:https://huggingface.co/spaces/gradio/chatbot_streaming_main
(4)、scatter_plot_demo
测试地址:https://huggingface.co/spaces/gradio/scatter_plot_demo_main