anilkumar-kanasani commited on
Commit
dec2b7d
1 Parent(s): e6f8d33

Update app.py

Browse files

Changing to HF model

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -68,7 +68,7 @@ if check_password():
68
  for page in bytes_data.pages:
69
  input_text += page.extract_text()
70
 
71
- st.session_state.ner_chain = LLMChain(llm=openai_chat_model, prompt=ENTITY_EXTRACTION_PROMPT)
72
  st.session_state.ners = st.session_state.ner_chain.run(input_text=input_text, verbose=True)
73
 
74
  input_text = input_text.replace('\n', '')
@@ -79,7 +79,7 @@ if check_password():
79
  st.session_state.chat_history = []
80
  st.session_state.formatted_prompt = get_qa_prompt(st.session_state.ners)
81
  st.session_state.chat_chain = ConversationalRetrievalChain.from_llm(
82
- openai_chat_model,
83
  chain_type="stuff", # "stuff", "map_reduce", "refine", "map_rerank"
84
  verbose=True,
85
  retriever=vector_store.as_retriever(),
 
68
  for page in bytes_data.pages:
69
  input_text += page.extract_text()
70
 
71
+ st.session_state.ner_chain = LLMChain(llm=hf_chat_model, prompt=ENTITY_EXTRACTION_PROMPT)
72
  st.session_state.ners = st.session_state.ner_chain.run(input_text=input_text, verbose=True)
73
 
74
  input_text = input_text.replace('\n', '')
 
79
  st.session_state.chat_history = []
80
  st.session_state.formatted_prompt = get_qa_prompt(st.session_state.ners)
81
  st.session_state.chat_chain = ConversationalRetrievalChain.from_llm(
82
+ hf_chat_model,
83
  chain_type="stuff", # "stuff", "map_reduce", "refine", "map_rerank"
84
  verbose=True,
85
  retriever=vector_store.as_retriever(),