Skip to content

Commit

Permalink
Update demo_ui.py
Browse files Browse the repository at this point in the history
Signed-off-by: Zuhayer C <[email protected]>
  • Loading branch information
ZooHigher26 authored Sep 2, 2024
1 parent 4a480db commit 4d066ba
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions example/demo_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def genRANstring(n):

# CREATE THE SIDEBAR
with st.sidebar:
st.image('img/RMIT_POS3.png', use_column_width=True)
st.image('example/img/project-group-name.png', use_column_width=True)
st.session_state.temperature = st.slider('Temperature:', min_value=0.0, max_value=1.0, value=0.1, step=0.02)
st.session_state.maxlength = st.slider('Length reply:', min_value=150, max_value=1000,
value=500, step=50)
Expand All @@ -78,14 +78,14 @@ def genRANstring(n):
if "messages" not in st.session_state:
st.session_state.messages = [
{"role": "system", "content": "You are assistant, a helpful assistant. You reply only to the user questions. You always reply in the language of the instructions.",},
{"role": "user", "content": "Hi, I am P000252SE."},
{"role": "user", "content": "Hi, I am P000455CSITCPL."},
{"role": "assistant", "content": "Hi there, I am assistant, how may I help you today?"}
]
# we define the function to clear from the screen the conversation history
def clearHistory():
st.session_state.messages = [
{"role": "system", "content": "You are assistant, a helpful assistant. You reply only to the user questions. You always reply in the language of the instructions.",},
{"role": "user", "content": "Hi, I am P000252SE."},
{"role": "user", "content": "Hi, I am P000455CSITCPL."},
{"role": "assistant", "content": "Hi there, I am assistant, how may I help you today?"}
]
if btnClear:
Expand Down

0 comments on commit 4d066ba

Please sign in to comment.