From 4bf5727123d98ad5a4b8c5ff469ba7cf1b9d4347 Mon Sep 17 00:00:00 2001 From: YSH Date: Thu, 13 Jun 2024 18:14:25 -0700 Subject: [PATCH] style: Update tokenizer CSS for improved readability and theme --- scripts/tokenizer.py | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/scripts/tokenizer.py b/scripts/tokenizer.py index 7989a8e..55cd612 100644 --- a/scripts/tokenizer.py +++ b/scripts/tokenizer.py @@ -6,16 +6,15 @@ import gradio as gr css = """ .tokenizer-token{ + opacity: 0.8; cursor: pointer; + --body-text-color: #000; } -.tokenizer-token-0 {background: rgba(255, 0, 0, 0.05);} -.tokenizer-token-0:hover {background: rgba(255, 0, 0, 0.15);} -.tokenizer-token-1 {background: rgba(0, 255, 0, 0.05);} -.tokenizer-token-1:hover {background: rgba(0, 255, 0, 0.15);} -.tokenizer-token-2 {background: rgba(0, 0, 255, 0.05);} -.tokenizer-token-2:hover {background: rgba(0, 0, 255, 0.15);} -.tokenizer-token-3 {background: rgba(255, 156, 0, 0.05);} -.tokenizer-token-3:hover {background: rgba(255, 156, 0, 0.15);} +.tokenizer-token:hover {opacity: 1;} +.tokenizer-token-0 {background: var(--primary-300);} +.tokenizer-token-1 {background: var(--primary-400);} +.tokenizer-token-2 {background: var(--primary-500);} +.tokenizer-token-3 {background: var(--primary-600);} """