alessio-vertemati commited on
Commit
aa2ac45
·
1 Parent(s): 58c1383

Example url

Browse files
Files changed (1) hide show
  1. app.py +12 -1
app.py CHANGED
@@ -192,10 +192,14 @@ def main():
192
  with gr.Column():
193
  url_input = gr.Textbox(
194
  label="URL",
195
- placeholder="https://oneofftech.xyz/blog/parxing-week-2025/?utm=token-counter",
196
  lines=1
197
  )
198
 
 
 
 
 
199
  url_model_dropdown = gr.Dropdown(
200
  choices=[
201
  # reasoning
@@ -243,6 +247,13 @@ def main():
243
  lines=3
244
  )
245
 
 
 
 
 
 
 
 
246
  # Connect the URL button to the URL counting function
247
  url_count_btn.click(
248
  fn=count_tokens_from_url,
 
192
  with gr.Column():
193
  url_input = gr.Textbox(
194
  label="URL",
195
+ placeholder="Enter URL here...",
196
  lines=1
197
  )
198
 
199
+ gr.Markdown("**Example:** `https://oneofftech.xyz/blog/parxing-week-2025/?utm=token-counter`")
200
+
201
+ use_example_btn = gr.Button("Use Example URL", size="sm")
202
+
203
  url_model_dropdown = gr.Dropdown(
204
  choices=[
205
  # reasoning
 
247
  lines=3
248
  )
249
 
250
+ # Connect the example button to fill the URL input
251
+ use_example_btn.click(
252
+ fn=lambda: "https://oneofftech.xyz/blog/parxing-week-2025/?utm=token-counter",
253
+ inputs=[],
254
+ outputs=[url_input]
255
+ )
256
+
257
  # Connect the URL button to the URL counting function
258
  url_count_btn.click(
259
  fn=count_tokens_from_url,