KvrParaskevi commited on
Commit
5349598
1 Parent(s): b5d12e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -6,8 +6,8 @@ from transformers import AutoModelForCausalLM, AutoTokenizer
6
  st.title("Hi, I am Chatbot Philio :mermaid:")
7
  st.write("I am your hotel booking assistant for today.")
8
 
9
- tokenizer, model = demo_chat.load_model()
10
-
11
  scrollable_div_style = """
12
  <style>
13
  .scrollable-div {
@@ -64,7 +64,7 @@ if input_text := st.chat_input(placeholder="Here you can chat with our hotel boo
64
  st.session_state.chat_history.append({"role" : "user", "content" : input_text}) #append message to chat history
65
 
66
  with st.spinner("Generating response..."):
67
- first_answer = generate_response(st.session_state.chat_history)
68
 
69
  with st.chat_message("assistant"):
70
  st.markdown(first_answer)
 
6
  st.title("Hi, I am Chatbot Philio :mermaid:")
7
  st.write("I am your hotel booking assistant for today.")
8
 
9
+ #tokenizer, model = demo_chat.load_model()
10
+ pipeline = demo_chat.load_pipeline()
11
  scrollable_div_style = """
12
  <style>
13
  .scrollable-div {
 
64
  st.session_state.chat_history.append({"role" : "user", "content" : input_text}) #append message to chat history
65
 
66
  with st.spinner("Generating response..."):
67
+ first_answer = demo_chat.generate_from_pipeline(st.session_state.chat_history, pipeline)
68
 
69
  with st.chat_message("assistant"):
70
  st.markdown(first_answer)