bibekyess commited on
Commit
3522ea2
Β·
1 Parent(s): 4366c9f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -45,6 +45,7 @@ db = create_database()
45
  # st.session_state["model"] = AutoModelForSeq2SeqLM.from_pretrained(
46
  # "MBZUAI/LaMini-Flan-T5-783M"
47
  # )
 
48
  @st.cache_resource()
49
  def load_model():
50
  print("test")
@@ -93,8 +94,7 @@ if user_input:
93
  if tag in ["greeting"]:
94
  output = "Hello πŸ‘‹! Thanks for visiting!\n I am BGPT! I am here to assist you in obtaining information about Bibek. Feel free to ask me any questions about Bibek. These are some sample questions:\n (I) Tell me about Bibek.\n (II) What skills does Bibek have?\n (III) What work experience does Bibek have?\n (IV) What is Bibek's educational background?\n (V) What awards has Bibek won?\n (VI) What projects have Bibek completed? &\n (VII) How can I contact Bibek?"
95
  else:
96
- tokenizer = st.session_state["tokenizer"]
97
- model = st.session_state["model"]
98
  docs = db.similarity_search(user_input)
99
  output = wrap_text_preserve_newlines(str(docs[0]))
100
  if tag in ["welcome", "thanks", "exit"]:
 
45
  # st.session_state["model"] = AutoModelForSeq2SeqLM.from_pretrained(
46
  # "MBZUAI/LaMini-Flan-T5-783M"
47
  # )
48
+
49
  @st.cache_resource()
50
  def load_model():
51
  print("test")
 
94
  if tag in ["greeting"]:
95
  output = "Hello πŸ‘‹! Thanks for visiting!\n I am BGPT! I am here to assist you in obtaining information about Bibek. Feel free to ask me any questions about Bibek. These are some sample questions:\n (I) Tell me about Bibek.\n (II) What skills does Bibek have?\n (III) What work experience does Bibek have?\n (IV) What is Bibek's educational background?\n (V) What awards has Bibek won?\n (VI) What projects have Bibek completed? &\n (VII) How can I contact Bibek?"
96
  else:
97
+ tokenizer, model = load_model()
 
98
  docs = db.similarity_search(user_input)
99
  output = wrap_text_preserve_newlines(str(docs[0]))
100
  if tag in ["welcome", "thanks", "exit"]: