Spaces:
Sleeping
Sleeping
Mike commited on
Commit ·
e4ade06
1
Parent(s): 9423162
fix: visual fixes
Browse files- dialog_emo_demo/plotting.py +4 -4
- dialog_emo_demo/ui.py +1 -4
- tests/test_plotting.py +1 -1
dialog_emo_demo/plotting.py
CHANGED
|
@@ -74,12 +74,12 @@ def build_emotion_figure(
|
|
| 74 |
margin={"l": 52, "r": 20, "t": 14, "b": 48},
|
| 75 |
paper_bgcolor="#fffdf8",
|
| 76 |
plot_bgcolor="#fffaf0",
|
| 77 |
-
hovermode="x unified"
|
| 78 |
hoverdistance=18,
|
| 79 |
-
spikedistance=
|
| 80 |
hoverlabel={
|
| 81 |
-
"bgcolor": "
|
| 82 |
-
"bordercolor": "
|
| 83 |
"font": {"color": "#ffffff", "size": 14},
|
| 84 |
},
|
| 85 |
legend={
|
|
|
|
| 74 |
margin={"l": 52, "r": 20, "t": 14, "b": 48},
|
| 75 |
paper_bgcolor="#fffdf8",
|
| 76 |
plot_bgcolor="#fffaf0",
|
| 77 |
+
hovermode="x unified",
|
| 78 |
hoverdistance=18,
|
| 79 |
+
spikedistance=0,
|
| 80 |
hoverlabel={
|
| 81 |
+
"bgcolor": "rgba(17, 24, 39, 0.72)",
|
| 82 |
+
"bordercolor": "rgba(17, 24, 39, 0.72)",
|
| 83 |
"font": {"color": "#ffffff", "size": 14},
|
| 84 |
},
|
| 85 |
legend={
|
dialog_emo_demo/ui.py
CHANGED
|
@@ -144,7 +144,6 @@ CSS = """
|
|
| 144 |
}
|
| 145 |
.slice-card {
|
| 146 |
background: #fff7dc !important;
|
| 147 |
-
border: 1px solid #f3d48b;
|
| 148 |
border-radius: 8px;
|
| 149 |
padding: 54px 12px 8px;
|
| 150 |
}
|
|
@@ -283,9 +282,7 @@ def build_app() -> gr.Blocks:
|
|
| 283 |
|
| 284 |
with gr.Blocks(title="Dialog Emotion Timeline", fill_width=True) as app:
|
| 285 |
gr.Markdown(
|
| 286 |
-
"# Трекинг эмоциональной окраски диалога
|
| 287 |
-
"CSV-контракт отделяет интерфейс от модели: каждая строка уже содержит "
|
| 288 |
-
"текст чанка, отправителя, время и распределение вероятностей по эмоциям.",
|
| 289 |
elem_classes=["main-title"],
|
| 290 |
)
|
| 291 |
|
|
|
|
| 144 |
}
|
| 145 |
.slice-card {
|
| 146 |
background: #fff7dc !important;
|
|
|
|
| 147 |
border-radius: 8px;
|
| 148 |
padding: 54px 12px 8px;
|
| 149 |
}
|
|
|
|
| 282 |
|
| 283 |
with gr.Blocks(title="Dialog Emotion Timeline", fill_width=True) as app:
|
| 284 |
gr.Markdown(
|
| 285 |
+
"# Трекинг эмоциональной окраски диалога",
|
|
|
|
|
|
|
| 286 |
elem_classes=["main-title"],
|
| 287 |
)
|
| 288 |
|
tests/test_plotting.py
CHANGED
|
@@ -36,7 +36,7 @@ def test_build_emotion_figure_has_one_trace_per_group() -> None:
|
|
| 36 |
figure = build_emotion_figure(frame, window=1)
|
| 37 |
|
| 38 |
assert len(figure.data) == len(EMOTION_GROUPS)
|
| 39 |
-
assert figure.layout.hovermode == "
|
| 40 |
assert figure.layout.yaxis.range == (0, 1)
|
| 41 |
|
| 42 |
|
|
|
|
| 36 |
figure = build_emotion_figure(frame, window=1)
|
| 37 |
|
| 38 |
assert len(figure.data) == len(EMOTION_GROUPS)
|
| 39 |
+
assert figure.layout.hovermode == "x unified"
|
| 40 |
assert figure.layout.yaxis.range == (0, 1)
|
| 41 |
|
| 42 |
|