Spaces:
Sleeping
Sleeping
Commit
·
28a74a6
1
Parent(s):
eef12aa
feat(ui): apply consistent padding and scaling across components
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ def main_interface():
|
|
19 |
with gr.Blocks(
|
20 |
theme=tibetan_theme,
|
21 |
title="Tibetan Text Metrics Web App",
|
22 |
-
css=tibetan_theme.get_css_string() + ".metric-description { padding: 1.5rem !important; }"
|
23 |
) as demo:
|
24 |
gr.Markdown(
|
25 |
"""# Tibetan Text Metrics Web App
|
@@ -31,7 +31,7 @@ def main_interface():
|
|
31 |
|
32 |
with gr.Row(elem_id="steps-row"):
|
33 |
with gr.Column(scale=1, elem_classes="step-column"):
|
34 |
-
with gr.Group():
|
35 |
gr.Markdown(
|
36 |
"""
|
37 |
## Step 1: Upload Your Tibetan Text Files
|
@@ -49,7 +49,7 @@ def main_interface():
|
|
49 |
elem_classes="gr-markdown"
|
50 |
)
|
51 |
with gr.Column(scale=1, elem_classes="step-column"):
|
52 |
-
with gr.Group():
|
53 |
gr.Markdown(
|
54 |
"""## Step 2: Configure and run the analysis
|
55 |
<span style='font-size:16px;'>Choose your analysis options and click the button below to compute metrics and view results. For meaningful analysis, ensure your texts are segmented by chapter or section using the marker '༈' (<i>sbrul shad</i>). The tool will split files based on this marker.</span>
|
@@ -245,7 +245,7 @@ Each segment is represented as a vector of these TF-IDF scores, and the cosine s
|
|
245 |
|
246 |
# Add the appropriate plot
|
247 |
if metric_key == "Word Counts":
|
248 |
-
word_count_plot = gr.Plot(label="Word Counts per Segment", show_label=False)
|
249 |
else:
|
250 |
heatmap_tabs[metric_key] = gr.Plot(label=f"Heatmap: {metric_key}", show_label=False)
|
251 |
|
|
|
19 |
with gr.Blocks(
|
20 |
theme=tibetan_theme,
|
21 |
title="Tibetan Text Metrics Web App",
|
22 |
+
css=tibetan_theme.get_css_string() + ".metric-description, .step-box { padding: 1.5rem !important; }"
|
23 |
) as demo:
|
24 |
gr.Markdown(
|
25 |
"""# Tibetan Text Metrics Web App
|
|
|
31 |
|
32 |
with gr.Row(elem_id="steps-row"):
|
33 |
with gr.Column(scale=1, elem_classes="step-column"):
|
34 |
+
with gr.Group(elem_classes="step-box"):
|
35 |
gr.Markdown(
|
36 |
"""
|
37 |
## Step 1: Upload Your Tibetan Text Files
|
|
|
49 |
elem_classes="gr-markdown"
|
50 |
)
|
51 |
with gr.Column(scale=1, elem_classes="step-column"):
|
52 |
+
with gr.Group(elem_classes="step-box"):
|
53 |
gr.Markdown(
|
54 |
"""## Step 2: Configure and run the analysis
|
55 |
<span style='font-size:16px;'>Choose your analysis options and click the button below to compute metrics and view results. For meaningful analysis, ensure your texts are segmented by chapter or section using the marker '༈' (<i>sbrul shad</i>). The tool will split files based on this marker.</span>
|
|
|
245 |
|
246 |
# Add the appropriate plot
|
247 |
if metric_key == "Word Counts":
|
248 |
+
word_count_plot = gr.Plot(label="Word Counts per Segment", show_label=False, scale=1, elem_classes="metric-description")
|
249 |
else:
|
250 |
heatmap_tabs[metric_key] = gr.Plot(label=f"Heatmap: {metric_key}", show_label=False)
|
251 |
|