Skip to content

feat: DOC-283: Add gallery templates from docs #7184

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

Merged
merged 6 commits into from
Mar 10, 2025
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
title: Medical Image Classification with Bounding Boxes
type: community
group: Computer Vision
image: /static/templates/medical-image-classification.png
details: <h1>Classify medical images and draw regions</h1>
config: |
<View>
<Image name="image" value="$image"/>

<RectangleLabels name="label" toName="image">
<Label value="Tumor" background="green"/>
</RectangleLabels>

<Choices name="classification" toName="image">
<Choice value="Benign"/>
<Choice value="Malignant"/>
<Choice value="Normal"/>
</Choices>
</View>
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
title: LLM Response Grading
type: community
group: Generative AI
order: 6
image: /static/templates/response-grading.png
details: Assign a grade to LLM responses based on how well it meets your internal guidelines.
config: |
<View>
<Style>
.root {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
height: 100vh;
}
.container {
display: flex;
flex: 1;
}
.block {
flex: 1;
padding: 20px;
box-sizing: border-box;
}
.scrollable {
overflow-y: auto;
height: calc(100vh - 80px); /* Adjust height to accommodate header and footer */
}
.long-document {
background-color: #f9f9f9;
border-right: 1px solid #ddd;
}
.short-summary {
background-color: #f1f1f1;
}
.summary-rating {
padding: 20px;
background-color: #c3bcbc;
border-top: 1px solid #ddd;
text-align: center;
}
h2 {
margin-top: 0;
}
</Style>

<View className="root">
<View className="container">
<View className="block long-document scrollable">
<Header value="Long Document"/>
<Text name="document" value="$document"/>
</View>

<View className="block short-summary">
<Header value="Short Summary"/>
<Text name="summary" value="$summary"/>
</View>
</View>

<View className="summary-rating">
<Header value="Rate the Document Summary:"/>
<Rating name="rating" toName="summary" required="true"/>
</View>
</View>
</View>

<!--{ "data" : {
"document": [
"Opossums, commonly known as possums in North America, are marsupials found primarily in the Americas. The most well-known species is the Virginia opossum (Didelphis virginiana), which ranges from Central America and the eastern United States to southern Canada. These adaptable creatures are known for their ability to thrive in a variety of environments, including both rural and urban areas. Opossums are also found in South America, where different species inhabit a range of ecosystems, from tropical rainforests to temperate forests.",
"Opossums are highly adaptable in terms of habitat, often residing in woodlands, farmland, and even suburban backyards. They typically seek shelter in hollow trees, abandoned burrows, or any dark, enclosed space they can find. Opossums are nocturnal and omnivorous, with a diet that includes fruits, insects, small animals, and even carrion. Their opportunistic feeding habits contribute to their resilience and ability to live in close proximity to human settlements.",
"In terms of behavior, opossums are solitary and nomadic, often moving to different locations in search of food. They are known for their unique defense mechanism of 'playing dead' or 'playing possum' when threatened, which involves mimicking the appearance and smell of a sick or dead animal to deter predators. Opossums have relatively short lifespans, typically living only 2 to 4 years in the wild. Despite their short lives, they reproduce quickly, with females giving birth to large litters of up to 20 young, although not all offspring typically survive to maturity.",
"In popular culture, opossums often appear as symbols of resilience and survival due to their hardy nature and ability to adapt to various environments. They are sometimes depicted in a comical or misunderstood light, given their nocturnal habits and somewhat disheveled appearance. Despite this, they play a crucial role in the ecosystem by controlling insect and rodent populations and cleaning up carrion. Opossums have been featured in various forms of media, from cartoons and children's books to movies, often emphasizing their unique behaviors and survival strategies."
],
"summary": "Opossums, primarily found in the Americas, are adaptable marsupials known for thriving in diverse environments, from rural to urban areas. They are nocturnal and omnivorous, often seeking shelter in dark, enclosed spaces and employing a unique defense mechanism of 'playing dead' to deter predators. In popular culture, opossums symbolize resilience and survival, playing a crucial role in ecosystems by controlling insect and rodent populations and cleaning up carrion."
}
}
-->
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
title: Content Moderation
type: community
group: Natural Language Processing
image: /static/templates/content-moderation.png
details: <h1>Content moderation</h1>
config: |
<View>
<Text name="text" value="$text"/>

<Choices name="content_moderation" toName="text" choice="multiple" showInline="false">
<Choice value="Toxic" background="red"/>
<Choice value="Severely Toxic" background="brown"/>
<Choice value="Obscene" background="green"/>
<Choice value="Threat" background="blue"/>
<Choice value="Insult" background="orange"/>
<Choice value="Hate" background="grey"/>
</Choices>

<View style="margin-top: 2em; box-shadow: 2px 12px 15px #999; padding: 30px; border-radius: 5px; background-color: #F0FFF0;">
<Header value="Please provide additional comments"/>
<TextArea name="comments" toName="text" required="false"/>
</View>
</View>
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ config: |
<View>
<View style="display: grid; grid-template: auto/1fr 1fr; column-gap: 1em">
<Header value="Read the sentence in English" />
<Header value="Provide translaton in Spanish" />
<Header value="Provide translation in Spanish" />

<Text name="english" value="$english" />

Expand Down
Loading
Loading