Hiroaki Ogasawara commited on
Commit
fb1a07e
1 Parent(s): aa428bd

chore: google analytics

Browse files
Files changed (1) hide show
  1. app.py +14 -2
app.py CHANGED
@@ -102,8 +102,20 @@ def tokenize_text(text: str, tokenizer_name: str):
102
  token_count = len(tokens)
103
  return f"<p>{tokenized_text}</p><p>Token Count: {token_count}</p>"
104
 
105
-
106
- with gr.Blocks() as tokenization:
 
 
 
 
 
 
 
 
 
 
 
 
107
  with gr.Row():
108
  tokenizer_dropdown = gr.Dropdown(
109
  label="Tokenizerを選択", choices=tokenizer_names, value=tokenizer_names[0]
 
102
  token_count = len(tokens)
103
  return f"<p>{tokenized_text}</p><p>Token Count: {token_count}</p>"
104
 
105
+ # https://x.com/abidlabs/status/1721548226250371264/photo/1
106
+ ga_script = """
107
+ <!-- Google tag (gtag.js) -->
108
+ <script async src="https://www.googletagmanager.com/gtag/js?id=G-0SHLFV3PV0"></script>
109
+ <script>
110
+ window.dataLayer = window.dataLayer || [];
111
+ function gtag(){dataLayer.push(arguments);}
112
+ gtag('js', new Date());
113
+
114
+ gtag('config', 'G-0SHLFV3PV0');
115
+ </script>
116
+ """
117
+
118
+ with gr.Blocks(head=ga_script) as tokenization:
119
  with gr.Row():
120
  tokenizer_dropdown = gr.Dropdown(
121
  label="Tokenizerを選択", choices=tokenizer_names, value=tokenizer_names[0]