w commited on
Commit
134a5b8
·
1 Parent(s): e06fbb5

Remove example texts section

Browse files
Files changed (1) hide show
  1. app.py +18 -34
app.py CHANGED
@@ -308,12 +308,16 @@ button.primary:hover {
308
 
309
  .example-btn button {
310
  width: 100% !important;
 
 
 
311
  background: #ffffff !important;
312
- border: 1px solid #cbd5e1 !important;
313
- color: #475569 !important;
314
  font-weight: 600 !important;
315
  border-radius: 10px !important;
316
  padding: 10px 14px !important;
 
317
  }
318
 
319
  .example-btn button:hover {
@@ -352,14 +356,23 @@ input[type="radio"] {
352
  text-decoration: none;
353
  }
354
 
 
 
 
 
 
 
 
 
 
355
  footer {
356
  display: none !important;
357
  }
358
  """
359
 
360
  # Build Gradio interface
361
- with gr.Blocks(title="Ultra-FineWeb Classifier", css=custom_css) as demo:
362
- gr.HTML('<h1 class="main-title">Ultra-FineWeb Classifier</h1>')
363
  gr.HTML('<p class="subtitle">Lightweight fastText-based classifier for high-quality web data filtering</p>')
364
 
365
  with gr.Row():
@@ -385,20 +398,7 @@ with gr.Blocks(title="Ultra-FineWeb Classifier", css=custom_css) as demo:
385
  classify_btn = gr.Button("Classify", variant="primary", size="lg")
386
  clear_btn = gr.Button("Clear", variant="secondary", size="lg")
387
 
388
- with gr.Accordion("Example Texts", open=False):
389
- with gr.Row(elem_classes="example-buttons"):
390
- example_en_btn = gr.Button(
391
- "Load English Example",
392
- variant="secondary",
393
- size="md",
394
- elem_classes="example-btn",
395
- )
396
- example_zh_btn = gr.Button(
397
- "Load Chinese Example",
398
- variant="secondary",
399
- size="md",
400
- elem_classes="example-btn",
401
- )
402
 
403
  with gr.Column(scale=1):
404
  gr.HTML('<div class="section-header">Output</div>')
@@ -427,22 +427,6 @@ with gr.Blocks(title="Ultra-FineWeb Classifier", css=custom_css) as demo:
427
  outputs=[content_input, language, label_output, score_output],
428
  )
429
 
430
- def load_english_example():
431
- return EXAMPLE_EN, "en"
432
-
433
- def load_chinese_example():
434
- return EXAMPLE_ZH, "zh"
435
-
436
- example_en_btn.click(
437
- fn=load_english_example,
438
- outputs=[content_input, language],
439
- )
440
-
441
- example_zh_btn.click(
442
- fn=load_chinese_example,
443
- outputs=[content_input, language],
444
- )
445
-
446
  # Auto-update example when language changes
447
  def update_example_on_language_change(lang):
448
  if lang == "zh":
 
308
 
309
  .example-btn button {
310
  width: 100% !important;
311
+ display: flex !important;
312
+ align-items: center !important;
313
+ justify-content: center !important;
314
  background: #ffffff !important;
315
+ border: 2px solid #cbd5e1 !important;
316
+ color: #334155 !important;
317
  font-weight: 600 !important;
318
  border-radius: 10px !important;
319
  padding: 10px 14px !important;
320
+ box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06) !important;
321
  }
322
 
323
  .example-btn button:hover {
 
356
  text-decoration: none;
357
  }
358
 
359
+ /* Loading logo tint (Gradio/HF) */
360
+ gradio-app img[src*="logo"],
361
+ gradio-app img[src*="gradio"],
362
+ gradio-app img[alt*="logo" i],
363
+ gradio-app svg[aria-label*="logo" i],
364
+ gradio-app svg[role="img"] {
365
+ filter: hue-rotate(235deg) saturate(1.4) brightness(0.95);
366
+ }
367
+
368
  footer {
369
  display: none !important;
370
  }
371
  """
372
 
373
  # Build Gradio interface
374
+ with gr.Blocks(title="UltraFineWeb-L2-Selector", css=custom_css) as demo:
375
+ gr.HTML('<h1 class="main-title">UltraFineWeb-L2-Selector</h1>')
376
  gr.HTML('<p class="subtitle">Lightweight fastText-based classifier for high-quality web data filtering</p>')
377
 
378
  with gr.Row():
 
398
  classify_btn = gr.Button("Classify", variant="primary", size="lg")
399
  clear_btn = gr.Button("Clear", variant="secondary", size="lg")
400
 
401
+ # Example texts section removed per request.
 
 
 
 
 
 
 
 
 
 
 
 
 
402
 
403
  with gr.Column(scale=1):
404
  gr.HTML('<div class="section-header">Output</div>')
 
427
  outputs=[content_input, language, label_output, score_output],
428
  )
429
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
430
  # Auto-update example when language changes
431
  def update_example_on_language_change(lang):
432
  if lang == "zh":