Spaces:
Running
Running
add article and placeholder
Browse files
app.py
CHANGED
|
@@ -16,9 +16,7 @@ examples = [
|
|
| 16 |
]
|
| 17 |
|
| 18 |
title = "InstructionGen: Flan T5 Small & Bart Base"
|
| 19 |
-
description = (
|
| 20 |
-
"This demo compares the [flan-t5-small-instructiongen](https://huggingface.co/pszemraj/flan-t5-small-instructiongen) and [bart-base-instructiongen](https://huggingface.co/pszemraj/bart-base-instructiongen) models on 'creating' an instruction for arbitrary text."
|
| 21 |
-
)
|
| 22 |
article = "Both models generate instructions for Large Language Models (LLMs) from arbitrary text. They are trained on the [fleece2instructions](https://huggingface.co/datasets/pszemraj/fleece2instructions) dataset, which is a filtered/foramtted version of the [alpaca](https://huggingface.co/datasets/tatsu-lab/alpaca) dataset"
|
| 23 |
|
| 24 |
|
|
@@ -34,13 +32,18 @@ def inference(text):
|
|
| 34 |
|
| 35 |
io = gr.Interface(
|
| 36 |
inference,
|
| 37 |
-
gr.Textbox(
|
|
|
|
|
|
|
|
|
|
| 38 |
outputs=[
|
| 39 |
gr.Textbox(lines=3, label="Flan T5 Small", interactive=False),
|
| 40 |
gr.Textbox(lines=3, label="Bart Base", interactive=False),
|
| 41 |
],
|
| 42 |
title=title,
|
| 43 |
description=description,
|
|
|
|
| 44 |
examples=examples,
|
|
|
|
| 45 |
)
|
| 46 |
-
io.launch()
|
|
|
|
| 16 |
]
|
| 17 |
|
| 18 |
title = "InstructionGen: Flan T5 Small & Bart Base"
|
| 19 |
+
description = "This demo compares the [flan-t5-small-instructiongen](https://huggingface.co/pszemraj/flan-t5-small-instructiongen) and [bart-base-instructiongen](https://huggingface.co/pszemraj/bart-base-instructiongen) models on 'creating' an instruction for arbitrary text."
|
|
|
|
|
|
|
| 20 |
article = "Both models generate instructions for Large Language Models (LLMs) from arbitrary text. They are trained on the [fleece2instructions](https://huggingface.co/datasets/pszemraj/fleece2instructions) dataset, which is a filtered/foramtted version of the [alpaca](https://huggingface.co/datasets/tatsu-lab/alpaca) dataset"
|
| 21 |
|
| 22 |
|
|
|
|
| 32 |
|
| 33 |
io = gr.Interface(
|
| 34 |
inference,
|
| 35 |
+
gr.Textbox(
|
| 36 |
+
lines=3,
|
| 37 |
+
placeholder="Add text here & find out what intruction could cause an LLM to generate it!",
|
| 38 |
+
),
|
| 39 |
outputs=[
|
| 40 |
gr.Textbox(lines=3, label="Flan T5 Small", interactive=False),
|
| 41 |
gr.Textbox(lines=3, label="Bart Base", interactive=False),
|
| 42 |
],
|
| 43 |
title=title,
|
| 44 |
description=description,
|
| 45 |
+
article=article,
|
| 46 |
examples=examples,
|
| 47 |
+
cache_examples=False,
|
| 48 |
)
|
| 49 |
+
io.launch()
|