KvrParaskevi
commited on
Commit
•
c5c8de3
1
Parent(s):
b163ec6
Update app.py
Browse files
app.py
CHANGED
@@ -14,10 +14,6 @@ st.write("I am your hotel booking assistant for today.")
|
|
14 |
|
15 |
# tokenizer = AutoTokenizer.from_pretrained("KvrParaskevi/Hotel-Assistant-Attempt4-Llama-2-7b")
|
16 |
|
17 |
-
# [theme]
|
18 |
-
# base="light"
|
19 |
-
# primaryColor="#6b4bff"
|
20 |
-
|
21 |
tokenizer, model = demo_chat.load_model()
|
22 |
|
23 |
model_identifier = "KvrParaskevi/Hotel-Assistant-Attempt4-Llama-2-7b"
|
@@ -60,7 +56,7 @@ with st.container():
|
|
60 |
|
61 |
if input_text:
|
62 |
with st.chat_message("user"):
|
63 |
-
st.write(input_text)
|
64 |
st.session_state.chat_history.append({"role" : "user", "content" : input_text}) #append message to chat history
|
65 |
|
66 |
#chat_response = demo_chat.demo_chain(input_text=input_text, memory=st.session_state.memory, model= chat_model)
|
@@ -71,6 +67,6 @@ with st.container():
|
|
71 |
first_answer = tokenizer.decode(outputs[0][tokenized_chat.shape[1]:],skip_special_tokens=True)
|
72 |
|
73 |
with st.chat_message("assistant"):
|
74 |
-
st.write(first_answer)
|
75 |
st.session_state.chat_history.append({"role": "assistant", "content": first_answer})
|
76 |
st.markdown('</div>', unsafe_allow_html=True)
|
|
|
14 |
|
15 |
# tokenizer = AutoTokenizer.from_pretrained("KvrParaskevi/Hotel-Assistant-Attempt4-Llama-2-7b")
|
16 |
|
|
|
|
|
|
|
|
|
17 |
tokenizer, model = demo_chat.load_model()
|
18 |
|
19 |
model_identifier = "KvrParaskevi/Hotel-Assistant-Attempt4-Llama-2-7b"
|
|
|
56 |
|
57 |
if input_text:
|
58 |
with st.chat_message("user"):
|
59 |
+
#st.write(input_text)
|
60 |
st.session_state.chat_history.append({"role" : "user", "content" : input_text}) #append message to chat history
|
61 |
|
62 |
#chat_response = demo_chat.demo_chain(input_text=input_text, memory=st.session_state.memory, model= chat_model)
|
|
|
67 |
first_answer = tokenizer.decode(outputs[0][tokenized_chat.shape[1]:],skip_special_tokens=True)
|
68 |
|
69 |
with st.chat_message("assistant"):
|
70 |
+
#st.write(first_answer)
|
71 |
st.session_state.chat_history.append({"role": "assistant", "content": first_answer})
|
72 |
st.markdown('</div>', unsafe_allow_html=True)
|