Leiyre HF staff commited on
Commit
b05f40e
1 Parent(s): 14f85b1
app.py CHANGED
@@ -1,70 +0,0 @@
1
- import gradio as gr
2
-
3
- from src.distilabel_dataset_generator._tabbedinterface import TabbedInterface
4
- from src.distilabel_dataset_generator.apps.faq import app as faq_app
5
- from src.distilabel_dataset_generator.apps.sft import app as sft_app
6
- from src.distilabel_dataset_generator.apps.textcat import app as textcat_app
7
-
8
- theme = gr.themes.Monochrome(
9
- spacing_size="md",
10
- font=[gr.themes.GoogleFont("Inter"), "ui-sans-serif", "system-ui", "sans-serif"],
11
- )
12
-
13
- css = """
14
- .main_ui_logged_out{opacity: 0.3; pointer-events: none}
15
- .tabitem{border: 0px}
16
- .group_padding{padding: .55em}
17
- #space_model .wrap > label:last-child{opacity: 0.3; pointer-events:none}
18
- #system_prompt_examples {
19
- color: black;
20
- }
21
- @media (prefers-color-scheme: dark) {
22
- #system_prompt_examples {
23
- color: white;
24
- background-color: black;
25
- }
26
- }
27
- button[role="tab"].selected,
28
- button[role="tab"][aria-selected="true"],
29
- button[role="tab"][data-tab-id][aria-selected="true"] {
30
- background-color: #000000;
31
- color: white;
32
- border: none;
33
- font-size: 16px;
34
- font-weight: bold;
35
- box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
36
- transition: background-color 0.3s ease, color 0.3s ease;
37
- }
38
- .gallery {
39
- color: black !important;
40
- }
41
- @media (prefers-color-scheme: dark) {
42
- .gallery {
43
- color: white !important;
44
- }
45
- }
46
- .flex-shrink-0.truncate.px-1 {
47
- color: black !important;
48
- }
49
- @media (prefers-color-scheme: dark) {
50
- .flex-shrink-0.truncate.px-1 {
51
- color: white !important;
52
- }
53
- }
54
- """
55
-
56
- demo = TabbedInterface(
57
- [textcat_app, sft_app, faq_app],
58
- ["Text Classification", "Supervised Fine-Tuning", "FAQ"],
59
- css=css,
60
- title="""
61
- <h1>Synthetic Data Generator</h1>
62
- <h3>Build datasets using natural language</h3>
63
- """,
64
- head="Synthetic Data Generator",
65
- theme=theme,
66
- )
67
-
68
-
69
- if __name__ == "__main__":
70
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
src/distilabel_dataset_generator/_tabbedinterface.py CHANGED
@@ -64,7 +64,7 @@ class TabbedInterface(Blocks):
64
  HTML(value=title)
65
  with gr.Row():
66
  with gr.Column(scale=1):
67
- gr.LoginButton(value="Sign in!", size="sm", scale=2)
68
  with gr.Column(scale=3):
69
  pass
70
  with Tabs():
 
64
  HTML(value=title)
65
  with gr.Row():
66
  with gr.Column(scale=1):
67
+ gr.LoginButton(value="Sign in!", variant="hf-login", size="sm", scale=2)
68
  with gr.Column(scale=3):
69
  pass
70
  with Tabs():
src/distilabel_dataset_generator/apps/eval.py CHANGED
@@ -188,7 +188,7 @@ with gr.Blocks() as app:
188
  search_type="dataset",
189
  sumbit_on_select=True,
190
  )
191
- load_btn = gr.Button("Load dataset")
192
  with gr.Column(scale=3):
193
  search_out = gr.HTML(label="Dataset Preview")
194
 
 
188
  search_type="dataset",
189
  sumbit_on_select=True,
190
  )
191
+ load_btn = gr.Button("Load dataset", variant="primary")
192
  with gr.Column(scale=3):
193
  search_out = gr.HTML(label="Dataset Preview")
194
 
src/distilabel_dataset_generator/apps/sft.py CHANGED
@@ -360,7 +360,7 @@ with gr.Blocks(css=_LOGGED_OUT_CSS) as app:
360
  label="Example descriptions",
361
  )
362
 
363
- load_btn = gr.Button("Load dataset")
364
  with gr.Column(scale=3):
365
  pass
366
 
 
360
  label="Example descriptions",
361
  )
362
 
363
+ load_btn = gr.Button("Load dataset", variant="primary")
364
  with gr.Column(scale=3):
365
  pass
366
 
src/distilabel_dataset_generator/apps/textcat.py CHANGED
@@ -368,7 +368,7 @@ with gr.Blocks(css=_LOGGED_OUT_CSS) as app:
368
  cache_examples=False,
369
  label="Example descriptions",
370
  )
371
- load_btn = gr.Button("Load dataset")
372
  with gr.Column(scale=3):
373
  pass
374
 
 
368
  cache_examples=False,
369
  label="Example descriptions",
370
  )
371
+ load_btn = gr.Button("Load dataset", variant="primary")
372
  with gr.Column(scale=3):
373
  pass
374