Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: OPTIC-1045: Update default placeholder text used in task data to be more clear #6656

Merged
merged 5 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 58 additions & 28 deletions label_studio/core/utils/schema/data_examples.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,26 @@
{
"editor_preview": {
"TextRaw": "To have faith is to trust yourself to the water",
"TextRaw": "Sample: Your text will go here.",
"TextUrl": "https://htx-pub.s3.amazonaws.com/example.txt",
"HyperText": "<div style=\"max-width: 750px\"><div style=\"clear: both\"><div style=\"float: right; display: inline-block; border: 1px solid #F2F3F4; background-color: #F8F9F9; border-radius: 5px; padding: 7px; margin: 10px 0;\"><p><b>Jules<\/b>: No no, Mr. Wolfe, it's not like that. Your help is definitely appreciated.<\/p><\/div><\/div><div style=\"clear: both\"><div style=\"float: right; display: inline-block; border: 1px solid #F2F3F4; background-color: #F8F9F9; border-radius: 5px; padding: 7px; margin: 10px 0;\"><p><b>Vincent<\/b>: Look, Mr. Wolfe, I respect you. I just don't like people barking orders at me, that's all.<\/p><\/div><\/div><div style=\"clear: both\"><div style=\"display: inline-block; border: 1px solid #D5F5E3; background-color: #EAFAF1; border-radius: 5px; padding: 7px; margin: 10px 0;\"><p><b>The Wolf<\/b>: If I'm curt with you, it's because time is a factor. I think fast, I talk fast, and I need you two guys to act fast if you want to get out of this. So pretty please, with sugar on top, clean the car.<\/p><\/div><\/div><\/div>",
"HyperText": "<div style=\"max-width: 750px\"><div style=\"clear: both\"><div style=\"float: right; display: inline-block; border: 1px solid #F2F3F4; background-color: #F8F9F9; border-radius: 5px; padding: 7px; margin: 10px 0;\"><p><b>Jules</b>: No no, Mr. Wolfe, it's not like that. Your help is definitely appreciated.</p></div></div><div style=\"clear: both\"><div style=\"float: right; display: inline-block; border: 1px solid #F2F3F4; background-color: #F8F9F9; border-radius: 5px; padding: 7px; margin: 10px 0;\"><p><b>Vincent</b>: Look, Mr. Wolfe, I respect you. I just don't like people barking orders at me, that's all.</p></div></div><div style=\"clear: both\"><div style=\"display: inline-block; border: 1px solid #D5F5E3; background-color: #EAFAF1; border-radius: 5px; padding: 7px; margin: 10px 0;\"><p><b>The Wolf</b>: If I'm curt with you, it's because time is a factor. I think fast, I talk fast, and I need you two guys to act fast if you want to get out of this. So pretty please, with sugar on top, clean the car.</p></div></div></div>",
"HyperTextUrl": "<HOSTNAME>/static/samples/hypertext.html",
"Image": "<HOSTNAME>/static/samples/sample.jpg",
"Audio": "<HOSTNAME>/static/samples/game.wav",
"AudioPlus": "<HOSTNAME>/static/samples/game.wav",
"Header": "Task header",
"Paragraphs": [{"author": "Alice", "text": "Hi, Bob."}, {"author": "Bob", "text": "Hello, Alice!"}, {"author": "Alice", "text": "What's up?"}, {"author": "Bob", "text": "Good. Ciao!"}, {"author": "Alice", "text": "Bye, Bob."}],
"Header": "Sample: Header text",
"Paragraphs": [
{ "author": "Alice", "text": "Sample: Text #1" },
{ "author": "Bob", "text": "Sample: Text #2" },
{ "author": "Alice", "text": "Sample: Text #3" },
{ "author": "Bob", "text": "Sample: Text #4" },
{ "author": "Alice", "text": "Sample: Text #5" }
],
"ParagraphsUrl": "<HOSTNAME>/samples/paragraphs.json?",
"Table": {"Card number": 18799210, "First name": "Max", "Last name": "Nobel"},
"Table": {
"Card number": 18799210,
"First name": "Sample",
"Last name": "Text"
},
"$videoHack": "<video src='<HOSTNAME>/static/samples/opossum_snow.mp4' width=100% controls>",
"Video": "<HOSTNAME>/static/samples/opossum_snow.mp4",
"Labels": [
Expand Down Expand Up @@ -42,55 +52,75 @@
"List": [
{
"id": 1,
"title": "The Amazing World of Opossums",
"title": "Sample: The Amazing World of Opossums",
"body": "Opossums are fascinating marsupials native to North America. They have prehensile tails, which help them to climb trees and navigate their surroundings with ease. Additionally, they are known for their unique defense mechanism, called 'playing possum,' where they mimic the appearance and smell of a dead animal to deter predators."
},
{
"id": 2,
"title": "Opossums: Nature's Pest Control",
"title": "Sample: Opossums: Nature's Pest Control",
"body": "Opossums play a crucial role in controlling insect and rodent populations, as they consume a variety of pests like cockroaches, beetles, and mice. This makes them valuable allies for gardeners and homeowners, as they help to maintain a balanced ecosystem and reduce the need for chemical pest control methods."
},
{
"id": 3,
"title": "Fun Fact: Opossums Are Immune to Snake Venom",
"title": "Sample: Fun Fact: Opossums Are Immune to Snake Venom",
"body": "One surprising characteristic of opossums is their natural immunity to snake venom. They have a unique protein in their blood called 'Lethal Toxin-Neutralizing Factor' (LTNF), which neutralizes venom from a variety of snake species, including rattlesnakes and cottonmouths. This allows opossums to prey on snakes without fear of harm, further highlighting their important role in the ecosystem."
}
],
"$longText": "Opossums are frequently considered to be living fossils, and as a result are often used to approximate the ancestral therian condition in comparative studies. However, this is inaccurate, the oldest opossum fossils are early Miocene in age (roughly 20 million years old) and the last common ancestor of all living opossums approximately dates to the Oligocene-Miocene boundary (roughly 23 million years ago) and is at most no older than Oligocene in age. Many extinct metatherians once considered early opossums, such as Alphadon, Peradectes, Herpetotherium, and Pucadelphys, have since been recognized to have been previously grouped with opossums on the basis of plesiomorphies and are now considered to represent older branches of Metatheria only distantly related to modern opossums.",
"$corefText": "I voted for Obama because he was most aligned with my values, she said.",
"$longText": "Sample: This is a sample text for long text task. It can be used for text classification, named entity recognition, etc.",
"$corefText": "Sample: This is a sample text for coreference resolution and entity linking task.",
"$pdf": "<embed src='<HOSTNAME>/static/samples/sample.pdf' width='100%' height='600px'/>",
"$website": "<iframe src='http://heartex.ai' width='100%' height='600px'/>",
"$headlessCsv": "<HOSTNAME>/static/samples/sample-task-sin-headless.csv",
"$humanMachineDialogue": [
{"author": "Human", "text": "Hi, Robot!"},
{"author": "Robot", "text": "Nice to meet you, man! Tell me what you want."},
{"author": "Human", "text": "Order me a pizza from Golden Boy at Green Street "},
{"author": "Robot", "text": "Done. When do you want to get the order?"},
{"author": "Human", "text": "At 3am in the morning, please"}],
"$respone": "Sure, no problem!",
"$resptwo": "Sorry, it's too early. May be we can change the time?",
"$respthree": "Don't eat junk food man, it's bad for you...",
{ "author": "Human", "text": "Sample: Hi, Robot!" },
{
"author": "Robot",
"text": "Sample: Nice to meet you, human! Tell me what you want."
},
{
"author": "Human",
"text": "Sample: Order me a pizza from Golden Boy at Green Street "
},
{
"author": "Robot",
"text": "Sample: Done. When do you want to get the order?"
},
{ "author": "Human", "text": "Sample: At 3am in the morning, please" }
],
"$respone": "Sample: Response #1",
"$resptwo": "Sample: Response #2",
"$respthree": "Sample: Response #3",
"$ocr": "https://htx-pub.s3.amazonaws.com/demo/ocr/example.jpg",
"$ner": "A Florida restaurant paid 10,925 pounds ($16,935) for the draft of \\\"Ain't no telling\\\", which Hendrix penned on a piece of London hotel stationery in late 1966.",
"$ner": "Sample: This is a sample text for named entity recognition task.",
"$captioning": "<HOSTNAME>/static/samples/trees_in_snow.jpg",
"$pairText1": "Look at this! It's a brand new product",
"$pairText2": "Look at this! It's an awesome piece of sh*t"
"$pairText1": "Sample: Text #1",
"$pairText2": "Sample: Text #2"
},
"upload": {
"TextRaw": "To have faith is to trust yourself to the water",
"TextRaw": "Sample: Your text will go here.",
"TextUrl": "https://htx-pub.s3.amazonaws.com/example.txt",
"HyperText": "<a href='heartex.net'>Heartex</a>",
"HyperText": "<a href='https://labelstud.io'>Label Studio</a>",
"Image": "<HOSTNAME>/static/samples/sample.jpg",
"Audio": "<HOSTNAME>/static/samples/game.wav",
"AudioPlus": "<HOSTNAME>/static/samples/game.wav",
"Header": "Task header",
"Paragraphs": [{"author": "Alice", "text": "Hi, Bob."}, {"author": "Bob", "text": "Hello, Alice!"}, {"author": "Alice", "text": "What's up?"}, {"author": "Bob", "text": "Good. Ciao!"}, {"author": "Alice", "text": "Bye, Bob."}],
"Table": {"Card number": 18799210, "First name": "Max", "Last name": "Nobel"},
"Header": "Sample: Header text",
"Paragraphs": [
{ "author": "Alice", "text": "Sample: Hi, Bob." },
{ "author": "Bob", "text": "Sample: Hello, Alice!" },
{ "author": "Alice", "text": "Sample: What's up?" },
{ "author": "Bob", "text": "Sample: Good. Ciao!" },
{ "author": "Alice", "text": "Sample: Bye, Bob." }
],
"Table": {
"Card number": 18799210,
"First name": "Sample",
"Last name": "Text"
},
"$videoHack": "<video src='static/samples/opossum_snow.mp4' width=100% controls>",
"Video": "<HOSTNAME>/static/samples/opossum_snow.mp4",
"$longText": "Opossums are frequently considered to be living fossils, and as a result are often used to approximate the ancestral therian condition in comparative studies. However, this is inaccurate, the oldest opossum fossils are early Miocene in age (roughly 20 million years old) and the last common ancestor of all living opossums approximately dates to the Oligocene-Miocene boundary (roughly 23 million years ago) and is at most no older than Oligocene in age. Many extinct metatherians once considered early opossums, such as Alphadon, Peradectes, Herpetotherium, and Pucadelphys, have since been recognized to have been previously grouped with opossums on the basis of plesiomorphies and are now considered to represent older branches of Metatheria only distantly related to modern opossums.",
"$longText": "Sample: This is a sample text for long text task. It can be used for text classification, named entity recognition, etc.",
"$pdf": "<embed src='<HOSTNAME>/static/samples/sample.pdf' width='100%' height='600px'/>",
"$website": "<iframe src='https://heartex.ai' width='100%' height='600px'/>",
"$website": "<iframe src='https://labelstud.io' width='100%' height='600px'/>",
"$headlessCsv": "<HOSTNAME>/static/samples/sample-task-sin-headless.csv"
}
}
10 changes: 5 additions & 5 deletions label_studio/tests/sample_tasks.tavern.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ stages:
response:
json:
dialogue:
- phrase: Hi, Bob.
- phrase: 'Sample: Text #1'
speaker: Alice
- phrase: Hello, Alice!
- phrase: 'Sample: Text #2'
speaker: Bob
- phrase: What's up?
- phrase: 'Sample: Text #3'
speaker: Alice
- phrase: Good. Ciao!
- phrase: 'Sample: Text #4'
speaker: Bob
- phrase: Bye, Bob.
- phrase: 'Sample: Text #5'
speaker: Alice
status_code: 200

Expand Down
Loading