Spaces:
Runtime error
Runtime error
Commit
Β·
44fc64a
1
Parent(s):
cc48701
update imports for application usage
Browse files- app.py +1 -35
- src/distilabel_dataset_generator/app.py +38 -0
app.py
CHANGED
@@ -1,38 +1,4 @@
|
|
1 |
-
from distilabel_dataset_generator.
|
2 |
-
from distilabel_dataset_generator.apps.eval import app as eval_app
|
3 |
-
from distilabel_dataset_generator.apps.faq import app as faq_app
|
4 |
-
from distilabel_dataset_generator.apps.sft import app as sft_app
|
5 |
-
from distilabel_dataset_generator.apps.textcat import app as textcat_app
|
6 |
-
|
7 |
-
theme = "argilla/argilla-theme"
|
8 |
-
|
9 |
-
css = """
|
10 |
-
button[role="tab"][aria-selected="true"] { border: 0; background: var(--neutral-800); color: white; border-top-right-radius: var(--radius-md); border-top-left-radius: var(--radius-md)}
|
11 |
-
button[role="tab"][aria-selected="true"]:hover {border-color: var(--button-primary-background-fill)}
|
12 |
-
button.hf-login {background: var(--neutral-800); color: white}
|
13 |
-
button.hf-login:hover {background: var(--neutral-700); color: white}
|
14 |
-
.tabitem { border: 0; padding-inline: 0}
|
15 |
-
.main_ui_logged_out{opacity: 0.3; pointer-events: none}
|
16 |
-
.group_padding{padding: .55em}
|
17 |
-
.gallery-item {background: var(--background-fill-secondary); text-align: left}
|
18 |
-
.gallery {white-space: wrap}
|
19 |
-
#space_model .wrap > label:last-child{opacity: 0.3; pointer-events:none}
|
20 |
-
#system_prompt_examples {
|
21 |
-
color: var(--body-text-color) !important;
|
22 |
-
background-color: var(--block-background-fill) !important;
|
23 |
-
}
|
24 |
-
.container {padding-inline: 0 !important}
|
25 |
-
"""
|
26 |
-
|
27 |
-
demo = TabbedInterface(
|
28 |
-
[textcat_app, sft_app, eval_app, faq_app],
|
29 |
-
["Text Classification", "Supervised Fine-Tuning", "Evaluation", "FAQ"],
|
30 |
-
css=css,
|
31 |
-
title="Synthetic Data Generator",
|
32 |
-
head="Synthetic Data Generator",
|
33 |
-
theme=theme,
|
34 |
-
)
|
35 |
-
|
36 |
|
37 |
if __name__ == "__main__":
|
38 |
demo.launch()
|
|
|
1 |
+
from distilabel_dataset_generator.app import demo
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
|
3 |
if __name__ == "__main__":
|
4 |
demo.launch()
|
src/distilabel_dataset_generator/app.py
ADDED
@@ -0,0 +1,38 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from distilabel_dataset_generator._tabbedinterface import TabbedInterface
|
2 |
+
from distilabel_dataset_generator.apps.eval import app as eval_app
|
3 |
+
from distilabel_dataset_generator.apps.faq import app as faq_app
|
4 |
+
from distilabel_dataset_generator.apps.sft import app as sft_app
|
5 |
+
from distilabel_dataset_generator.apps.textcat import app as textcat_app
|
6 |
+
|
7 |
+
theme = "argilla/argilla-theme"
|
8 |
+
|
9 |
+
css = """
|
10 |
+
button[role="tab"][aria-selected="true"] { border: 0; background: var(--neutral-800); color: white; border-top-right-radius: var(--radius-md); border-top-left-radius: var(--radius-md)}
|
11 |
+
button[role="tab"][aria-selected="true"]:hover {border-color: var(--button-primary-background-fill)}
|
12 |
+
button.hf-login {background: var(--neutral-800); color: white}
|
13 |
+
button.hf-login:hover {background: var(--neutral-700); color: white}
|
14 |
+
.tabitem { border: 0; padding-inline: 0}
|
15 |
+
.main_ui_logged_out{opacity: 0.3; pointer-events: none}
|
16 |
+
.group_padding{padding: .55em}
|
17 |
+
.gallery-item {background: var(--background-fill-secondary); text-align: left}
|
18 |
+
.gallery {white-space: wrap}
|
19 |
+
#space_model .wrap > label:last-child{opacity: 0.3; pointer-events:none}
|
20 |
+
#system_prompt_examples {
|
21 |
+
color: var(--body-text-color) !important;
|
22 |
+
background-color: var(--block-background-fill) !important;
|
23 |
+
}
|
24 |
+
.container {padding-inline: 0 !important}
|
25 |
+
"""
|
26 |
+
|
27 |
+
demo = TabbedInterface(
|
28 |
+
[textcat_app, sft_app, eval_app, faq_app],
|
29 |
+
["Text Classification", "Supervised Fine-Tuning", "Evaluation", "FAQ"],
|
30 |
+
css=css,
|
31 |
+
title="Synthetic Data Generator",
|
32 |
+
head="Synthetic Data Generator",
|
33 |
+
theme=theme,
|
34 |
+
)
|
35 |
+
|
36 |
+
|
37 |
+
if __name__ == "__main__":
|
38 |
+
demo.launch()
|