Pippoz commited on
Commit
025d45a
2 Parent(s): 648f6db 8c3d701

Merge branch 'main' of https://huggingface.co/spaces/Pippoz/All_in_one into main

Browse files
Files changed (1) hide show
  1. pages/chat.py +2 -2
pages/chat.py CHANGED
@@ -5,7 +5,7 @@ from transformers import BlenderbotForConditionalGeneration
5
 
6
 
7
  def app():
8
- @st.experimental_singleton
9
  def get_models():
10
  # it may be necessary for other frameworks to cache the model
11
  # seems pytorch keeps an internal state of the conversation
@@ -36,7 +36,7 @@ def app():
36
  st.session_state.history.append({"message": message_bot, "is_user": False})
37
 
38
 
39
- st.text_input("Hi, nice to meet you AI!", key="input_text", on_change=generate_answer)
40
 
41
  for chat in st.session_state.history:
42
  st_message(**chat) # unpacking
5
 
6
 
7
  def app():
8
+ @st.experimental_singleton(show_spinner=False, suppress_st_warning=True)
9
  def get_models():
10
  # it may be necessary for other frameworks to cache the model
11
  # seems pytorch keeps an internal state of the conversation
36
  st.session_state.history.append({"message": message_bot, "is_user": False})
37
 
38
 
39
+ st.text_input("Enter your prompt...", key="input_text", on_change=generate_answer)
40
 
41
  for chat in st.session_state.history:
42
  st_message(**chat) # unpacking