mirror of
https://github.com/gradio-app/gradio.git
synced 2025-01-06 10:25:17 +08:00
33e8babb17
* Enable hidding inline_category in HighlightedText * add changeset * Update test_highlighted_text.py * add changeset * Update gradio/components/highlighted_text.py Co-authored-by: Abubakar Abid <abubakar@huggingface.co> * add story --------- Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com> Co-authored-by: Abubakar Abid <abubakar@huggingface.co> Co-authored-by: Hannah <hannahblair@users.noreply.github.com>
32 lines
728 B
Markdown
32 lines
728 B
Markdown
# `@gradio/highlightedtext`
|
|
|
|
```html
|
|
<script>
|
|
import { BaseStaticHighlightedText, BaseInteractiveHighlightedText } from `@gradio/highlightedtext`;
|
|
</script>
|
|
```
|
|
|
|
|
|
BaseStaticHighlightedText
|
|
```javascript
|
|
export let value: {
|
|
token: string;
|
|
class_or_confidence: string | number | null;
|
|
}[] = [];
|
|
export let show_legend = false;
|
|
export let show_inline_category = true;
|
|
export let color_map: Record<string, string> = {};
|
|
export let selectable = false;
|
|
```
|
|
|
|
BaseInteractiveHighlightedText
|
|
```javascript
|
|
export let value: {
|
|
token: string;
|
|
class_or_confidence: string | number | null;
|
|
}[] = [];
|
|
export let show_legend = false;
|
|
export let color_map: Record<string, string> = {};
|
|
export let selectable = false;
|
|
```
|