Leire Aguirre
commited on
Commit
•
c6b2612
1
Parent(s):
74e248e
include argilla-theme
Browse files
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()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|