kortique commited on
Commit
6a14446
·
2 Parent(s): 5626cfb 0e5c22f

Merge branch 'main' of https://huggingface.co/spaces/PiperMy/Academy

Browse files
docs/creating-pipelines/connect-nodes.mdx CHANGED
@@ -1,5 +1,5 @@
1
  ---
2
- sidebar_position: 2
3
  ---
4
 
5
  # Connecting Nodes
@@ -41,7 +41,7 @@ Each node has specific input and output types such as:
41
 
42
  - **Boolean**
43
  - **Integer**
44
- - **Float
45
  - **String** or **String[]** (Array of strings)
46
  - **Image** or **Image[]** (Array of images)
47
  - **Archive**
 
1
  ---
2
+ sidebar_position: 3
3
  ---
4
 
5
  # Connecting Nodes
 
41
 
42
  - **Boolean**
43
  - **Integer**
44
+ - **Float**
45
  - **String** or **String[]** (Array of strings)
46
  - **Image** or **Image[]** (Array of images)
47
  - **Archive**
docs/creating-pipelines/define-inputs-and-outputs.mdx CHANGED
@@ -1,47 +1,192 @@
1
  ---
2
- sidebar_position: 3
3
  ---
4
 
5
  # Define Inputs & Outputs
6
 
7
- Once your nodes are connected, the next step is to define where your pipeline starts (inputs) and ends (outputs).
8
 
9
- ## What are Inputs?
10
 
11
- Inputs are the data your pipeline begins with.
12
- For example:
13
 
14
- - A **text prompt**
15
- - An **image** uploaded by the user
16
- - A **number** or configuration value used in calculations
17
 
18
- To define an input:
19
 
20
- Here
 
 
21
 
22
- Video
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
- ## What are Outputs?
 
 
 
 
25
 
26
- Outputs are the final result produced by the pipeline.
27
- For example:
28
 
29
- - A generated text
30
- - A generated or modified image
31
- - JSON data for use in another app
32
 
33
- To define an output:
 
34
 
35
- Here
 
 
 
36
 
37
  Video
38
 
39
- ## Tips for Working with Inputs and Outputs
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
40
 
41
- - Use **clear names** for your input/output nodes to make the pipeline easy to understand.
42
- - You can have **multiple inputs and outputs** if your use case requires it.
43
- - Some nodes can act as both intermediate processors and final outputs — choose what makes the most sense for your flow.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
 
45
- :::tip Tip
46
- Defining inputs and outputs makes your pipeline reusable and easier to integrate into other systems.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
  :::
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ sidebar_position: 2
3
  ---
4
 
5
  # Define Inputs & Outputs
6
 
7
+ To make your pipeline interactive and user-friendly, you need to define **inputs** (what the user can control) and **outputs** (what the pipeline returns).
8
 
9
+ Inputs and outputs are made available by **extracting them from specific nodes**. This makes them visible in the **Playground** (for user input) and **Results tab** (for viewing outputs).
10
 
11
+ ---
 
12
 
13
+ ## Extracting Inputs & Outputs
 
 
14
 
15
+ To expose an input or output:
16
 
17
+ 1. Hover over the desired node.
18
+ 2. Click the small **circle port** of the input or output you want to extract.
19
+ 3. Press the **"Take out"** button.
20
 
21
+ Once extracted, the item will appear in the Playground interface (for inputs) or Results tab (for outputs).
22
+
23
+ ---
24
+
25
+ ## 1. Defining Inputs
26
+
27
+ ### Option A: Through the Playground
28
+
29
+ After extracting inputs, they automatically appear in the **Playground** — a simple interface for providing data to your pipeline.
30
+
31
+ Users can:
32
+
33
+ - Enter values directly into the input fields
34
+ - Run the pipeline using those values
35
+ - View results instantly in the interface
36
+
37
+ #### Setting Default Values
38
+
39
+ You can define **default values** that will be shown in the Playground:
40
+
41
+ 1. Click on the **name** of an input field.
42
+ 2. This opens the **input editor**.
43
+ 3. Enter the default value — it will be pre-filled for users but can still be changed.
44
+
45
+ #### Organizing Inputs
46
+
47
+ To rearrange inputs for better clarity:
48
+
49
+ - Click and hold the input field
50
+ - Drag it using the **hand icon**
51
+
52
+ :::tip
53
+ Place inputs in a logical and visually clear layout to improve usability, especially in larger pipelines.
54
+ :::
55
+
56
+ You can extract inputs from **multiple nodes**, regardless of their order in the pipeline.
57
 
58
+ ---
59
+
60
+ ### Option B: Through the Node Editor (Workspace)
61
+
62
+ You can also configure node inputs directly inside the node editor:
63
 
64
+ 1. Hover over a node and click the **edit icon**.
65
+ 2. The editor displays all configurable inputs for that node.
66
 
67
+ Here you can:
 
 
68
 
69
+ - Set **default values** — used when the Playground input is empty
70
+ - Enable or disable **auto-run** (toggle in the top-left corner)
71
 
72
+ > If auto-run is enabled, the node executes when the pipeline starts.
73
+ > If disabled, it runs only after receiving data from another node.
74
+
75
+ To test pipeline execution from the workspace, press the **Play** button in the top-left corner. The entire pipeline will run, and results will be shown inline.
76
 
77
  Video
78
 
79
+ ---
80
+
81
+ ## 2. Defining Outputs
82
+
83
+ To expose the final result of the pipeline:
84
+
85
+ 1. Click on the **output port** of the node.
86
+ 2. Press **"Take out"** — the output will now be visible in:
87
+ - The **Results** tab after execution
88
+ - The **Playground**, where results appear interactively
89
+
90
+ You can extract outputs from **any node**, regardless of its position or execution order. This makes it easy to monitor intermediate values or final results.
91
+
92
+ In the next section, we’ll look at how to **connect nodes** to pass data between them.
93
+
94
+
95
+ ---
96
+ sidebar_position: 3
97
+ ---
98
+
99
+ # Определение входов и выходов
100
+
101
+ Чтобы пайплайна могла принимать данные от пользователя и возвращать результат, необходимо определить:
102
+
103
+ - **Входы** — данные, которые можно подать извне (например, через Playground)
104
+ - **Выходы** — результат выполнения пайплайны, который можно отобразить в интерфейсе
105
+
106
+ Для этого необходимо **вынести** нужные входы и выходы из конкретных нод.
107
 
108
+ ---
109
+
110
+ ## Как вынести входы и выходы
111
+
112
+ Чтобы сделать вход или выход доступным:
113
+
114
+ 1. Наведите курсор на нужную ноду.
115
+ 2. Кликните на кружок рядом с нужным входом или выходом.
116
+ 3. Нажмите кнопку **"Take out"**.
117
+
118
+ После этого:
119
+ - **Вход** появится в интерфейсе **Playground**, где поль��ователь сможет ввести данные.
120
+ - **Выход** отобразится во вкладке **Results** после выполнения пайплайны.
121
+
122
+ ---
123
+
124
+ ## 1. Определение входов
125
+
126
+ ### Способ A: Через Playground
127
+
128
+ После того как входы были вынесены, они автоматически появляются в **Playground** — простом пользовательском интерфейсе для ввода данных.
129
 
130
+ Пользователь может:
131
+ - Ввести данные вручную
132
+ - Запустить пайплайну и получить результат
133
+
134
+ #### Установка значений по умолчанию
135
+
136
+ Можно настроить значения, которые будут подставляться по умолчанию:
137
+
138
+ 1. Нажмите на название входа.
139
+ 2. Откроется редактор входа.
140
+ 3. Введите нужное значение — оно автоматически подставится в интерфейс, но его можно будет изменить.
141
+
142
+ #### Организация входов
143
+
144
+ Для удобства чтения и аккуратного вида:
145
+
146
+ - Зажмите поле входа и переместите его, используя значок **ладошки**
147
+
148
+ :::tip
149
+ Располагайте входы логично и визуально понятно, особенно если их много.
150
  :::
151
+
152
+ Можно вынести входы из **нескольких нод**, независимо от порядка их выполнения.
153
+
154
+ ---
155
+
156
+ ### Способ B: Через редактор ноды (в рабочей области)
157
+
158
+ Входы можно настраивать напрямую внутри ноды:
159
+
160
+ 1. Наведите курсор на ноду и нажмите **иконку редактирования**.
161
+ 2. Откроется редактор ноды, в котором отображаются все доступные входы.
162
+
163
+ Здесь можно:
164
+
165
+ - Указать **значения по умолчанию**, которые будут использоваться, если пользователь ничего не ввёл
166
+ - Включить или отключить **автозапуск ноды** (ползунок в левом верхнем углу)
167
+
168
+ > Если автозапуск включён — нода будет запускаться автоматически при старте пайплайны.
169
+ > Если выключен — нода сработает только при получении данных из другой ноды.
170
+
171
+ Чтобы проверить выполнение пайплайны из рабочей области, нажмите кнопку **Play** в верхнем левом углу.
172
+
173
+ 🎥 *[Здесь можно вставить видеоинструкцию]*
174
+
175
+ ---
176
+
177
+ ## 2. Определение выходов
178
+
179
+ Чтобы результат работы ноды отобразился в интерфейсе:
180
+
181
+ 1. Нажмите на **кружок выхода** у нужной ноды.
182
+ 2. Нажмите **"Take out"** — после выполнения пайплайны этот результат появится:
183
+ - Во вкладке **Results**
184
+ - В интерфейсе **Playground**
185
+
186
+ Выход можно вынести из **любой ноды**, вне зависимости от её расположения или порядка выполнения. Это удобно для отслеживания промежуточных результатов или финального вывода.
187
+
188
+ ---
189
+
190
+ ## Что дальше?
191
+
192
+ Теперь, когда вы знаете, как управлять входами и выходами, давайте рассмотрим, как соединять ноды между собой и передавать данные по цепочке.