Spaces:
Runtime error
Runtime error
Commit
Β·
143e30d
1
Parent(s):
f2778e4
fix: reintroduce app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
|
| 3 |
+
from src.distilabel_dataset_generator.apps.faq import app as faq_app
|
| 4 |
+
from src.distilabel_dataset_generator.apps.sft import app as sft_app
|
| 5 |
+
|
| 6 |
+
theme = gr.themes.Monochrome(
|
| 7 |
+
spacing_size="md",
|
| 8 |
+
font=[gr.themes.GoogleFont("Inter"), "ui-sans-serif", "system-ui", "sans-serif"],
|
| 9 |
+
)
|
| 10 |
+
|
| 11 |
+
css = """
|
| 12 |
+
h1{font-size: 2em}
|
| 13 |
+
h3{margin-top: 0}
|
| 14 |
+
#component-1{text-align:center}
|
| 15 |
+
.main_ui_logged_out{opacity: 0.3; pointer-events: none}
|
| 16 |
+
.tabitem{border: 0px}
|
| 17 |
+
.group_padding{padding: .55em}
|
| 18 |
+
#space_model .wrap > label:last-child{opacity: 0.3; pointer-events:none}
|
| 19 |
+
#system_prompt_examples {
|
| 20 |
+
color: black;
|
| 21 |
+
}
|
| 22 |
+
"""
|
| 23 |
+
|
| 24 |
+
|
| 25 |
+
demo = gr.TabbedInterface(
|
| 26 |
+
[sft_app, faq_app],
|
| 27 |
+
["Supervised Fine-Tuning", "FAQ"],
|
| 28 |
+
css=css,
|
| 29 |
+
title="βοΈ distilabel Dataset Generator",
|
| 30 |
+
head="βοΈ distilabel Dataset Generator",
|
| 31 |
+
theme=theme,
|
| 32 |
+
)
|
| 33 |
+
|
| 34 |
+
|
| 35 |
+
if __name__ == "__main__":
|
| 36 |
+
demo.launch()
|