Skip to content

Commit

Permalink
docs: fix dead links in guides (#6985)
Browse files Browse the repository at this point in the history
Fix dead links to doc in guides.

The dead link to
https://gradio.app/guides/quickstart/#blocks-more-flexibility-and-control
has been replaced by https://gradio.app/blocks-and-event-listeners.

Note: the CHANGELOG also has some references to the old links. I did not
change those in this commit.

Co-authored-by: Ali Abdalla <ali.si3luwa@gmail.com>
  • Loading branch information
tomjorquera and aliabd committed Jan 10, 2024
1 parent 6e285be commit c264828
Show file tree
Hide file tree
Showing 16 changed files with 22 additions and 22 deletions.
6 changes: 3 additions & 3 deletions guides/03_building-with-blocks/02_controlling-layout.md
Expand Up @@ -36,7 +36,7 @@ with gr.Blocks() as demo:

- `min_width` will set the minimum width the element will take. The Row will wrap if there isn't sufficient space to satisfy all `min_width` values.

Learn more about Rows in the [docs](https://gradio.app/docs/#row).
Learn more about Rows in the [docs](https://gradio.app/docs/row).

## Columns and Nesting

Expand All @@ -47,7 +47,7 @@ $demo_rows_and_columns

See how the first column has two Textboxes arranged vertically. The second column has an Image and Button arranged vertically. Notice how the relative widths of the two columns is set by the `scale` parameter. The column with twice the `scale` value takes up twice the width.

Learn more about Columns in the [docs](https://gradio.app/docs/#column).
Learn more about Columns in the [docs](https://gradio.app/docs/column).

# Dimensions

Expand Down Expand Up @@ -102,7 +102,7 @@ $demo_blocks_flipper

Also note the `gr.Accordion('label')` in this example. The Accordion is a layout that can be toggled open or closed. Like `Tabs`, it is a layout element that can selectively hide or show content. Any components that are defined inside of a `with gr.Accordion('label'):` will be hidden or shown when the accordion's toggle icon is clicked.

Learn more about [Tabs](https://gradio.app/docs/#tab) and [Accordions](https://gradio.app/docs/#accordion) in the docs.
Learn more about [Tabs](https://gradio.app/docs/tab) and [Accordions](https://gradio.app/docs/accordion) in the docs.

## Visibility

Expand Down
2 changes: 1 addition & 1 deletion guides/03_building-with-blocks/03_state-in-blocks.md
Expand Up @@ -27,4 +27,4 @@ Let's see how we do each of the 3 steps listed above in this game:

With more complex apps, you will likely have many State variables storing session state in a single Blocks app.

Learn more about `State` in the [docs](https://gradio.app/docs#state).
Learn more about `State` in the [docs](https://gradio.app/docs/state).
Expand Up @@ -2,7 +2,7 @@

Tags: TRANSLATION, HUB, SPACES

**Prerequisite**: This Guide builds on the Blocks Introduction. Make sure to [read that guide first](https://gradio.app/guides/quickstart/#blocks-more-flexibility-and-control).
**Prerequisite**: This Guide builds on the Blocks Introduction. Make sure to [read that guide first](https://gradio.app/blocks-and-event-listeners).

## Introduction

Expand Down
Expand Up @@ -12,7 +12,7 @@ This tutorial will show how to make chatbot UIs from scratch with Gradio's low-l
$demo_chatbot_streaming

**Prerequisite**: We'll be using the `gradio.Blocks` class to build our Chatbot demo.
You can [read the Guide to Blocks first](https://gradio.app/quickstart/#blocks-more-flexibility-and-control) if you are not already familiar with it. Also please make sure you are using the **latest version** version of Gradio: `pip install --upgrade gradio`.
You can [read the Guide to Blocks first](https://gradio.app/blocks-and-event-listeners) if you are not already familiar with it. Also please make sure you are using the **latest version** version of Gradio: `pip install --upgrade gradio`.

## A Simple Chatbot Demo

Expand Down
Expand Up @@ -13,7 +13,7 @@ This post will explore the recent enhancements in Gradio that allow users to int
Let's dive in!

**Prerequisites**: We'll be using the `gradio.Blocks` class in our examples.
You can [read the Guide to Blocks first](https://gradio.app/quickstart/#blocks-more-flexibility-and-control) if you are not already familiar with it. Also please make sure you are using the **latest version** version of Gradio: `pip install --upgrade gradio`.
You can [read the Guide to Blocks first](https://gradio.app/blocks-and-event-listeners) if you are not already familiar with it. Also please make sure you are using the **latest version** version of Gradio: `pip install --upgrade gradio`.


## Overview
Expand Down
@@ -1,6 +1,6 @@
# Developing Faster with Auto-Reloading

**Prerequisite**: This Guide requires you to know about Blocks. Make sure to [read the Guide to Blocks first](https://gradio.app/guides/quickstart/#blocks-more-flexibility-and-control).
**Prerequisite**: This Guide requires you to know about Blocks. Make sure to [read the Guide to Blocks first](https://gradio.app/blocks-and-event-listeners).

This guide covers auto reloading, reloading in a Python IDE, and using gradio with Jupyter Notebooks.

Expand Down
2 changes: 1 addition & 1 deletion guides/09_other-tutorials/using-flagging.md
Expand Up @@ -13,7 +13,7 @@ Gradio simplifies the collection of this data by including a **Flag** button wit

Flagging with Gradio's `Interface` is especially easy. By default, underneath the output components, there is a button marked **Flag**. When a user testing your model sees input with interesting output, they can click the flag button to send the input and output data back to the machine where the demo is running. The sample is saved to a CSV log file (by default). If the demo involves images, audio, video, or other types of files, these are saved separately in a parallel directory and the paths to these files are saved in the CSV file.

There are [four parameters](https://gradio.app/docs/#interface-header) in `gradio.Interface` that control how flagging works. We will go over them in greater detail.
There are [four parameters](https://gradio.app/docs/interface#initialization) in `gradio.Interface` that control how flagging works. We will go over them in greater detail.

- `allow_flagging`: this parameter can be set to either `"manual"` (default), `"auto"`, or `"never"`.
- `manual`: users will see a button to flag, and samples are only flagged when the button is clicked.
Expand Down
4 changes: 2 additions & 2 deletions guides/cn/01_getting-started/02_key-features.md
Expand Up @@ -16,7 +16,7 @@

## 示例输入

您可以提供用户可以轻松加载到 "Interface" 中的示例数据。这对于演示模型期望的输入类型以及演示数据集和模型一起探索的方式非常有帮助。要加载示例数据,您可以将嵌套列表提供给 Interface 构造函数的 `examples=` 关键字参数。外部列表中的每个子列表表示一个数据样本,子列表中的每个元素表示每个输入组件的输入。有关每个组件的示例数据格式在[Docs](https://gradio.app/docs#components)中有说明。
您可以提供用户可以轻松加载到 "Interface" 中的示例数据。这对于演示模型期望的输入类型以及演示数据集和模型一起探索的方式非常有帮助。要加载示例数据,您可以将嵌套列表提供给 Interface 构造函数的 `examples=` 关键字参数。外部列表中的每个子列表表示一个数据样本,子列表中的每个元素表示每个输入组件的输入。有关每个组件的示例数据格式在[Docs](https://gradio.app/docs/components)中有说明。

$code_calculator
$demo_calculator
Expand All @@ -27,7 +27,7 @@ $demo_calculator

## 错误

您希望向用户传递自定义错误消息。为此,with `gr.Error("custom message")` 来显示错误消息。如果在上面的计算器示例中尝试除以零,将显示自定义错误消息的弹出模态窗口。了解有关错误的更多信息,请参阅[文档](https://gradio.app/docs#error)
您希望向用户传递自定义错误消息。为此,with `gr.Error("custom message")` 来显示错误消息。如果在上面的计算器示例中尝试除以零,将显示自定义错误消息的弹出模态窗口。了解有关错误的更多信息,请参阅[文档](https://gradio.app/docs/error)

## 描述性内容

Expand Down
@@ -1,6 +1,6 @@
# 区块和事件监听器 (Blocks and Event Listeners)

我们在[快速入门](https://gradio.app/quickstart/#blocks-more-flexibility-and-control)中简要介绍了区块。让我们深入探讨一下。本指南将涵盖区块的结构、事件监听器及其类型、连续运行事件、更新配置以及使用字典与列表。
我们在[快速入门](https://gradio.app/blocks-and-event-listeners)中简要介绍了区块。让我们深入探讨一下。本指南将涵盖区块的结构、事件监听器及其类型、连续运行事件、更新配置以及使用字典与列表。

## 区块结构 (Blocks Structure)

Expand Down Expand Up @@ -28,7 +28,7 @@ output = gr.Textbox(label="输出", interactive=True)
$code_blocks_hello
$demo_blocks_hello

`welcome` 函数不是由点击触发的,而是由在文本框 `inp` 中输入文字触发的。这是由于 `change()` 事件监听器。不同的组件支持不同的事件监听器。例如,`Video` 组件支持一个 `play()` 事件监听器,当用户按下播放按钮时触发。有关每个组件的事件监听器,请参见[文档](http://gradio.app/docs#components)
`welcome` 函数不是由点击触发的,而是由在文本框 `inp` 中输入文字触发的。这是由于 `change()` 事件监听器。不同的组件支持不同的事件监听器。例如,`Video` 组件支持一个 `play()` 事件监听器,当用户按下播放按钮时触发。有关每个组件的事件监听器,请参见[文档](http://gradio.app/docs/components)

## 多个数据流 (Multiple Data Flows)

Expand Down
6 changes: 3 additions & 3 deletions guides/cn/03_building-with-blocks/02_controlling-layout.md
Expand Up @@ -36,7 +36,7 @@ with gr.Blocks() as demo:

- `min_width` 将设置元素的最小宽度。如果没有足够的空间满足所有的 `min_width` 值,行将换行。

[文档](https://gradio.app/docs/#row)中了解有关行的更多信息。
[文档](https://gradio.app/docs/row)中了解有关行的更多信息。

## 列和嵌套 (Columns and Nesting)

Expand All @@ -47,7 +47,7 @@ $demo_rows_and_columns

查看第一列如何垂直排列两个文本框。第二列垂直排列图像和按钮。注意两列的相对宽度由 `scale` 参数设置。具有两倍 `scale` 值的列占据两倍的宽度。

[文档](https://gradio.app/docs/#column)中了解有关列的更多信息。
[文档](https://gradio.app/docs/column)中了解有关列的更多信息。

## 选项卡和手风琴 (Tabs and Accordions)

Expand All @@ -60,7 +60,7 @@ $demo_blocks_flipper

还请注意本示例中的 `gr.Accordion('label')`。手风琴是一种可以切换打开或关闭的布局。与 `Tabs` 一样,它是可以选择性隐藏或显示内容的布局元素。在 `with gr.Accordion('label'):` 内定义的任何组件在单击手风琴的切换图标时都会被隐藏或显示。

在文档中了解有关[Tabs](https://gradio.app/docs/#tab)[Accordions](https://gradio.app/docs/#accordion)的更多信息。
在文档中了解有关[Tabs](https://gradio.app/docs/tab)[Accordions](https://gradio.app/docs/accordion)的更多信息。

## 可见性 (Visibility)

Expand Down
2 changes: 1 addition & 1 deletion guides/cn/03_building-with-blocks/03_state-in-blocks.md
Expand Up @@ -27,4 +27,4 @@ $demo_hangman

对于更复杂的应用程序,您可能会在一个单独的分块应用程序中使用许多存储会话状态的 `State` 变量。

[文档](https://gradio.app/docs#state)中了解更多关于 `State` 的信息。
[文档](https://gradio.app/docs/state)中了解更多关于 `State` 的信息。
Expand Up @@ -2,7 +2,7 @@

Tags: TRANSLATION, HUB, SPACES

**先决条件**: 本指南是在块介绍的基础上构建的。请确保[先阅读该指南](https://gradio.app/quickstart/#blocks-more-flexibility-and-control)
**先决条件**: 本指南是在块介绍的基础上构建的。请确保[先阅读该指南](https://gradio.app/blocks-and-event-listeners)

## 介绍

Expand Down
2 changes: 1 addition & 1 deletion guides/cn/07_other-tutorials/creating-a-chatbot.md
Expand Up @@ -14,7 +14,7 @@ Related spaces: https://huggingface.co/spaces/gradio/chatbot_streaming, https://
$ 演示 _ 聊天机器人 _ 流式

**先决条件**:我们将使用 `gradio.Blocks` 类来构建我们的聊天机器人演示。
如果您对此还不熟悉,可以[先阅读 Blocks 指南](https://gradio.app/quickstart/#blocks-more-flexibility-and-control)。同时,请确保您使用的是**最新版本**的 Gradio:`pip install --upgrade gradio`
如果您对此还不熟悉,可以[先阅读 Blocks 指南](https://gradio.app/blocks-and-event-listeners)。同时,请确保您使用的是**最新版本**的 Gradio:`pip install --upgrade gradio`

## 简单聊天机器人演示

Expand Down
2 changes: 1 addition & 1 deletion guides/cn/07_other-tutorials/creating-a-new-component.md
Expand Up @@ -2,7 +2,7 @@

## 简介

本指南旨在说明如何添加一个新组件,你可以在 Gradio 应用程序中使用该组件。该指南将通过代码片段逐步展示如何添加[ColorPicker](https://gradio.app/docs/#colorpicker)组件。
本指南旨在说明如何添加一个新组件,你可以在 Gradio 应用程序中使用该组件。该指南将通过代码片段逐步展示如何添加[ColorPicker](https://gradio.app/docs/colorpicker)组件。

## 先决条件

Expand Down
@@ -1,6 +1,6 @@
# 通过自动重载实现更快的开发

**先决条件**:本指南要求您了解块的知识。请确保[先阅读块指南](https://gradio.app/quickstart/#blocks-more-flexibility-and-control)
**先决条件**:本指南要求您了解块的知识。请确保[先阅读块指南](https://gradio.app/blocks-and-event-listeners)

本指南介绍了自动重新加载、在 Python IDE 中重新加载以及在 Jupyter Notebooks 中使用 gradio 的方法。

Expand Down
2 changes: 1 addition & 1 deletion guides/cn/07_other-tutorials/using-flagging.md
Expand Up @@ -13,7 +13,7 @@ Gradio 通过在每个“界面”中包含一个**标记**按钮来简化这些

使用 Gradio 的 `Interface` 进行标记特别简单。默认情况下,在输出组件下方有一个标记为**标记**的按钮。当用户测试您的模型时,如果看到有趣的输出,他们可以点击标记按钮将输入和输出数据发送回运行演示的机器。样本会保存在一个 CSV 日志文件中(默认情况下)。如果演示涉及图像、音频、视频或其他类型的文件,则这些文件会单独保存在一个并行目录中,并且这些文件的路径会保存在 CSV 文件中。

`gradio.Interface` 中有[四个参数](https://gradio.app/docs/#interface-header)控制标记的工作方式。我们将详细介绍它们。
`gradio.Interface` 中有[四个参数](https://gradio.app/docs/interface#initialization)控制标记的工作方式。我们将详细介绍它们。

- `allow_flagging`:此参数可以设置为 `"manual"`(默认值),`"auto"``"never"`
- `manual`:用户将看到一个标记按钮,只有在点击按钮时样本才会被标记。
Expand Down

0 comments on commit c264828

Please sign in to comment.