9-Building_and_sharing_demos-8-End-of-chapter_quiz
中英文对照学习,效果更佳!
原课程链接:https://huggingface.co/course/chapter9/9?fw=pt
End-of-chapter quiz
章末测验
问一个问题
Let’s test what you learned in this chapter!
让我们来测试一下你在这一章中学到的东西–™!
- What can you use Gradio to do?
Create a demo for your machine learning model
您可以使用GRadio做什么?为您的机器学习模型创建一个演示
Share your machine learning model with others
与他人分享您的机器学习模型
Debug your model
调试您的模型
Train your model
训练你的模特
- Gradio ONLY works with PyTorch models
True
GRadio仅适用于PyTorch型号True
False
错误
- Where can you launch a Gradio demo from?
Standard python IDEs
您可以从哪里启动GRadio演示?标准的pythonIDE
Google Colab notebooks
谷歌Colab笔记本电脑
Jupyter notebooks
木星笔记本
- Gradio is designed primarily for NLP models
True
GRadio主要是为NLP型号设计的True
False
错误
- Which of the following features are supported by Gradio?
Multiple inputs and outputs
GRadio支持以下哪些功能?多个输入和输出
State for data persistance
数据持久化状态
Username and passwords authentication
用户名和密码身份验证
Automatic analytics for who uses your gradio demo
自动分析使用您的Gradio演示的用户
Loading a model from Hugging Face’s model hub or Hugging Face Spaces
从Hugging Face的模型中心或Hugging Face空间加载模型
- Which of the following are valid ways of loading a Hugging Face model from Hub or Spaces?
gr.Interface.load(‘huggingface/{user}/{model_name}’)
以下哪些是从Hub或Spaces?gr.Interface.load(‘huggingface/{user}/{model_name}’)加载Hugging Face模型的有效方法
gr.Interface.load(‘model/{user}/{model_name}’)
Gr.Interface.load(‘model/{user}/{model_name}’)
gr.Interface.load(‘demos/{user}/{model_name}’)
Gr.Interface.load(‘demos/{user}/{model_name}’)
gr.Interface.load(‘spaces/{user}/{model_name}’)
Gr.Interface.load(‘spaces/{user}/{model_name}’)
- Select all the steps necessary for adding state to your Gradio interface
Pass in an extra parameter into your prediction function, which represents the state of the interface.
选择将状态添加到GRadio接口所需的所有步骤将一个额外的参数传递到预测函数中,该参数代表接口的状态。
At the end of the prediction function, return the updated value of the state as an extra return value.
在预测函数结束时,将更新后的状态值作为额外的返回值返回。
Add the state input and state output components when creating your Interface
在创建接口时添加状态输入和状态输出组件
- Which of the following are components included in the Gradio library?
Textbox.
以下哪些组件包含在GRadio库中?文本框。
Graph.
图表。
Image.
形象。
Audio.
音频。
- What does Gradio
Blocksallow you to do?
Combine multiple demos into one web app
GRadio‘Blocks’允许您做什么?将多个演示合并到一个Web应用程序中
Assign event triggers such as clicked/changed/etc to Blocks components
为Blocks组件分配CLICKED/CHANGED/等事件触发器
Automatically determine which Blocks component should be interactive vs. static
自动确定哪个Blocks组件应该是交互的,而不是静态的
Create multi-step demos; meaning allowing you to reuse the output of one component as the input to the next
创建多步骤演示;这意味着允许您将一个组件的输出重用为下一个组件的输入
- You can share a public link to a
Blocksdemo and host aBlocksdemo on Hugging Face spaces.
True
你可以分享一个公共链接到一个‘Blocks’演示,并主持一个关于拥抱面部空间的‘Blocks’演示。
False
错误
