Ludvig
commited on
Commit
·
846ae7b
1
Parent(s):
fd13c9f
Adds greyscale version for print. Adds reset callback to template selects.
Browse files
app.py
CHANGED
|
@@ -420,6 +420,7 @@ if st.session_state["step"] >= 2:
|
|
| 420 |
|
| 421 |
col1, col2, col3 = st.columns([2, 8, 2])
|
| 422 |
with col2:
|
|
|
|
| 423 |
st.write(" ")
|
| 424 |
image = Image.open(str(conf_mat_path)[:-3] + "jpg")
|
| 425 |
st.image(
|
|
@@ -429,6 +430,17 @@ if st.session_state["step"] >= 2:
|
|
| 429 |
channels="RGB",
|
| 430 |
output_format="auto",
|
| 431 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 432 |
st.write(" ")
|
| 433 |
st.write("Note: The downloadable file has a transparent background.")
|
| 434 |
|
|
|
|
| 420 |
|
| 421 |
col1, col2, col3 = st.columns([2, 8, 2])
|
| 422 |
with col2:
|
| 423 |
+
st.write(" ")
|
| 424 |
st.write(" ")
|
| 425 |
image = Image.open(str(conf_mat_path)[:-3] + "jpg")
|
| 426 |
st.image(
|
|
|
|
| 430 |
channels="RGB",
|
| 431 |
output_format="auto",
|
| 432 |
)
|
| 433 |
+
|
| 434 |
+
# Convert the image to grayscale
|
| 435 |
+
st.write(" ")
|
| 436 |
+
image = image.convert("CMYK").convert("L")
|
| 437 |
+
st.image(
|
| 438 |
+
image,
|
| 439 |
+
caption="Greyscale version for assessing colors in print",
|
| 440 |
+
clamp=False,
|
| 441 |
+
channels="RGB",
|
| 442 |
+
output_format="auto",
|
| 443 |
+
)
|
| 444 |
st.write(" ")
|
| 445 |
st.write("Note: The downloadable file has a transparent background.")
|
| 446 |
|
design.py
CHANGED
|
@@ -91,7 +91,7 @@ def select_settings():
|
|
| 91 |
)
|
| 92 |
_, col2, _ = st.columns([5, 6, 5])
|
| 93 |
with col2:
|
| 94 |
-
if st.button("Select", key=temp_name.replace(" ", "_")):
|
| 95 |
with open(
|
| 96 |
"template_resources/" + template["settings"],
|
| 97 |
"r",
|
|
|
|
| 91 |
)
|
| 92 |
_, col2, _ = st.columns([5, 6, 5])
|
| 93 |
with col2:
|
| 94 |
+
if st.button("Select", key=temp_name.replace(" ", "_"), on_click=reset_output_callback):
|
| 95 |
with open(
|
| 96 |
"template_resources/" + template["settings"],
|
| 97 |
"r",
|
plot.R
CHANGED
|
@@ -295,7 +295,10 @@ if (isTRUE(design_settings$show_sums)) {
|
|
| 295 |
label = design_settings$sum_tile_label,
|
| 296 |
tile_border_color = tile_border_color,
|
| 297 |
tile_border_size = design_settings$tile_border_size,
|
| 298 |
-
tile_border_linetype = design_settings$tile_border_linetype
|
|
|
|
|
|
|
|
|
|
| 299 |
)
|
| 300 |
}
|
| 301 |
|
|
|
|
| 295 |
label = design_settings$sum_tile_label,
|
| 296 |
tile_border_color = tile_border_color,
|
| 297 |
tile_border_size = design_settings$tile_border_size,
|
| 298 |
+
tile_border_linetype = design_settings$tile_border_linetype,
|
| 299 |
+
tc_tile_border_color = tile_border_color,
|
| 300 |
+
tc_tile_border_size = design_settings$tile_border_size,
|
| 301 |
+
tc_tile_border_linetype = design_settings$tile_border_linetype
|
| 302 |
)
|
| 303 |
}
|
| 304 |
|