Skip to content

Commit

Permalink
Missed some
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliaS92 committed Sep 17, 2024
1 parent c142747 commit e0ea0f1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
8 changes: 4 additions & 4 deletions alphastats/gui/pages/05_LLM.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def select_analysis():
return method


if "dataset" not in st.session_state:
if StateKeys.DATASET not in st.session_state:
st.info("Import Data first")
st.stop()

Expand Down Expand Up @@ -247,8 +247,8 @@ def select_analysis():
st.session_state[StateKeys.USER_PROMPT] = (
f"We've recently identified several proteins that appear to be differently regulated in cells "
f"when comparing {chosen_parameter_dict['group1']} and {chosen_parameter_dict['group2']} in the {chosen_parameter_dict['column']} group. "
f"From our proteomics experiments, we know that the following ones are upregulated: {', '.join(st.session_state['upregulated'])}.{os.linesep}{os.linesep}"
f"Here is the list of proteins that are downregulated: {', '.join(st.session_state['downregulated'])}.{os.linesep}{os.linesep}"
f"From our proteomics experiments, we know that the following ones are upregulated: {', '.join(st.session_state[StateKeys.UPREGULATED])}.{os.linesep}{os.linesep}"
f"Here is the list of proteins that are downregulated: {', '.join(st.session_state[StateKeys.DOWNREGULATED])}.{os.linesep}{os.linesep}"
f"Help us understand the potential connections between these proteins and how they might be contributing "
f"to the differences. After that provide a high level summary"
)
Expand Down Expand Up @@ -298,7 +298,7 @@ def select_analysis():
metadata=st.session_state[StateKeys.DATASET].metadata,
)
st.success(
f"{st.session_state['api_type'].upper()} integration initialized successfully!"
f"{st.session_state[StateKeys.API_TYPE].upper()} integration initialized successfully!"
)
except AuthenticationError:
st.warning(
Expand Down
1 change: 1 addition & 0 deletions alphastats/gui/utils/analysis_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ def load_options():

st.session_state[StateKeys.PLOTTING_OPTIONS] = plotting_options(st.session_state)
st.session_state[StateKeys.STATISTIC_OPTIONS] = statistic_options(st.session_state)
# TODO: Check if this should be reintroduced or removed
# st.session_state["interpretation_options"] = interpretation_options


Expand Down
2 changes: 1 addition & 1 deletion alphastats/gui/utils/openai_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def try_to_set_api_key(api_key: str = None) -> None:
Returns:
None
"""
if api_key and "api_key" not in st.session_state:
if api_key and [StateKeys.OPENAI_API_KEY] not in st.session_state:
st.session_state[StateKeys.OPENAI_API_KEY] = api_key
secret_path = Path(st.secrets._file_paths[-1])
secret_path.parent.mkdir(parents=True, exist_ok=True)
Expand Down

0 comments on commit e0ea0f1

Please sign in to comment.