show variables only when it exists (#277)

This commit is contained in:
XianBW
2024-09-19 17:37:29 +08:00
committed by GitHub
parent ce5f26f308
commit fd65cff556
+4 -3
View File
@@ -460,9 +460,10 @@ def tasks_window(tasks: list[FactorTask | ModelTask]):
st.latex(mt.formulation)
mks = "| Variable | Description |\n| --- | --- |\n"
for v, d in mt.variables.items():
mks += f"| ${v}$ | {d} |\n"
st.markdown(mks)
if mt.variables:
for v, d in mt.variables.items():
mks += f"| ${v}$ | {d} |\n"
st.markdown(mks)
def research_window():