Spaces:
Sleeping
Sleeping
victormiller
commited on
Commit
•
6f3b8c9
1
Parent(s):
0c45d35
Update data_viewer.py
Browse files- data_viewer.py +3 -5
data_viewer.py
CHANGED
@@ -13,7 +13,7 @@ def view_data(
|
|
13 |
before,
|
14 |
after,
|
15 |
doc_id,
|
16 |
-
data_source: str,
|
17 |
data_sources=None,
|
18 |
target: str = "colcontent",
|
19 |
):
|
@@ -24,11 +24,10 @@ def view_data(
|
|
24 |
for ds in data_sources
|
25 |
],
|
26 |
name=f"data_source_{target}",
|
27 |
-
hx_get="/curated",
|
28 |
hx_target=f"#{target}",
|
29 |
hx_trigger="change",
|
30 |
hx_swap="innerHTML",
|
31 |
-
hx_vals=json.dumps({"target": f"{target}"}),
|
32 |
)
|
33 |
|
34 |
slider = Input(
|
@@ -37,12 +36,11 @@ def view_data(
|
|
37 |
min="0",
|
38 |
max="9",
|
39 |
value=str(doc_id),
|
40 |
-
hx_get="/curated",
|
41 |
hx_target=f"#{target}",
|
42 |
hx_trigger="change",
|
43 |
hx_swap="innerHTML",
|
44 |
hx_include=f'[name="data_source_{target}"]',
|
45 |
-
hx_vals=json.dumps({"target": f"{target}"}),
|
46 |
)
|
47 |
|
48 |
form = Form(
|
|
|
13 |
before,
|
14 |
after,
|
15 |
doc_id,
|
16 |
+
data_source: str = None,
|
17 |
data_sources=None,
|
18 |
target: str = "colcontent",
|
19 |
):
|
|
|
24 |
for ds in data_sources
|
25 |
],
|
26 |
name=f"data_source_{target}",
|
27 |
+
hx_get=f"/curated/{target}",
|
28 |
hx_target=f"#{target}",
|
29 |
hx_trigger="change",
|
30 |
hx_swap="innerHTML",
|
|
|
31 |
)
|
32 |
|
33 |
slider = Input(
|
|
|
36 |
min="0",
|
37 |
max="9",
|
38 |
value=str(doc_id),
|
39 |
+
hx_get=f"/curated/{target}",
|
40 |
hx_target=f"#{target}",
|
41 |
hx_trigger="change",
|
42 |
hx_swap="innerHTML",
|
43 |
hx_include=f'[name="data_source_{target}"]',
|
|
|
44 |
)
|
45 |
|
46 |
form = Form(
|