Commit
•
a278ba6
1
Parent(s):
69d2e17
docs: update requirements mention pipeline code
Browse files
src/distilabel_dataset_generator/apps/sft.py
CHANGED
@@ -322,7 +322,10 @@ with gr.Blocks(
|
|
322 |
|
323 |
gr.Markdown("## Or run this pipeline locally with distilabel")
|
324 |
|
325 |
-
with gr.Accordion(
|
|
|
|
|
|
|
326 |
pipeline_code = gr.Code(
|
327 |
value=generate_pipeline_code(
|
328 |
system_prompt.value, num_turns.value, num_rows.value
|
|
|
322 |
|
323 |
gr.Markdown("## Or run this pipeline locally with distilabel")
|
324 |
|
325 |
+
with gr.Accordion(
|
326 |
+
"Run this pipeline using distilabel",
|
327 |
+
open=False,
|
328 |
+
):
|
329 |
pipeline_code = gr.Code(
|
330 |
value=generate_pipeline_code(
|
331 |
system_prompt.value, num_turns.value, num_rows.value
|
src/distilabel_dataset_generator/pipelines/sft.py
CHANGED
@@ -201,6 +201,7 @@ def _get_output_mappings(num_turns):
|
|
201 |
def generate_pipeline_code(system_prompt, num_turns, num_rows):
|
202 |
input_mappings = _get_output_mappings(num_turns)
|
203 |
code = f"""
|
|
|
204 |
from distilabel.pipeline import Pipeline
|
205 |
from distilabel.steps import KeepColumns
|
206 |
from distilabel.steps.tasks import MagpieGenerator
|
|
|
201 |
def generate_pipeline_code(system_prompt, num_turns, num_rows):
|
202 |
input_mappings = _get_output_mappings(num_turns)
|
203 |
code = f"""
|
204 |
+
# Requirements: `pip install distilabel[hf-inference-endpoints]`
|
205 |
from distilabel.pipeline import Pipeline
|
206 |
from distilabel.steps import KeepColumns
|
207 |
from distilabel.steps.tasks import MagpieGenerator
|