Skip to content

Commit

Permalink
fix: only show Solution once Solve is clicked
Browse files Browse the repository at this point in the history
  • Loading branch information
phanhongan committed Nov 15, 2024
1 parent 545216c commit 6dcde82
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions examples/llamarine/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,19 +90,19 @@ def main(use_domain_lm: bool = False):
with open(file=OUTPUT_FILE_PATH, mode='w', encoding='utf-8') as f:
f.write(json.dumps(st.session_state.agent_solutions))

solution = st.session_state.agent_solutions[st.session_state.typed_problem]
if use_domain_lm:
solution = OpenAILM.from_defaults().get_response(
prompt=f"""Please respond the following text, with making sure there is a conclusion which is the main action item at the end of the response.
{solution}
""",
history=[
{"role": "system", "content": LLAMARINE_SYSTEM_PROMPT},
{"role": "user", "content": LLAMARINE_USER_PROMPT},
]
)

st.markdown(body=solution)
solution = st.session_state.agent_solutions[st.session_state.typed_problem]
if use_domain_lm:
solution = OpenAILM.from_defaults().get_response(
prompt=f"""Please respond the following text, with making sure there is a conclusion which is the main action item at the end of the response.
{solution}
""",
history=[
{"role": "system", "content": LLAMARINE_SYSTEM_PROMPT},
{"role": "user", "content": LLAMARINE_USER_PROMPT},
]
)

st.markdown(body=solution)


if __name__ == '__main__':
Expand Down

0 comments on commit 6dcde82

Please sign in to comment.