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

Add keyboard shortcuts for fast labeling. #1028

Merged
merged 7 commits into from
Jan 5, 2024
Merged

Add keyboard shortcuts for fast labeling. #1028

merged 7 commits into from
Jan 5, 2024

Conversation

nsthorat
Copy link
Contributor

@nsthorat nsthorat commented Jan 5, 2024

This PR allows users to customize keyboard shortcuts for labels for a dataset.

NOTE: This persists across all users and is written to dataset settings.

https://huggingface.co/spaces/lilacai/nikhil_staging

keyboard_shortcuts.mp4

@nsthorat nsthorat changed the title [not ready] Add keyboard shortcuts for fast labeling. Add keyboard shortcuts for fast labeling. Jan 5, 2024
@nsthorat nsthorat requested a review from dsmilkov January 5, 2024 14:36
lilac/config.py Outdated
@@ -89,6 +89,8 @@ class DatasetUISettings(BaseModel):
markdown_paths: list[PathTuple] = []
model_config = ConfigDict(extra='forbid')
view_type: Literal['scroll', 'single_item'] = 'single_item'
# Maps a label to a keycode.
label_keyboard_shortcuts: dict[str, str] = {}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe shorten to label_to_keycode

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@nsthorat nsthorat merged commit e093048 into main Jan 5, 2024
4 checks passed
@nsthorat nsthorat deleted the nik-keyb branch January 5, 2024 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants