AbdallaouiMed commited on
Commit
ca895ef
1 Parent(s): 61875db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,7 +1,7 @@
1
  import streamlit as st
2
  from dotenv import load_dotenv
3
  from PyPDF2 import PdfReader
4
- from langchain_text_splitter import CharacterTextSplitter
5
  from langchain.embeddings import OpenAIEmbeddings, HuggingFaceEmbeddings
6
  from langchain.vectorstores import FAISS
7
  from langchain.chat_models import ChatOpenAI
@@ -39,7 +39,7 @@ def get_vectorstore(text_chunks):
39
 
40
  def get_conversation_chain(vectorstore):
41
  # llm = ChatOpenAI()
42
- llm = HuggingFaceHub(repo_id="HuggingFaceH4/zephyr-7b-beta", model_kwargs={"temperature":0.5, "max_length":512})
43
 
44
  memory = ConversationBufferMemory(
45
  memory_key='chat_history', return_messages=True)
 
1
  import streamlit as st
2
  from dotenv import load_dotenv
3
  from PyPDF2 import PdfReader
4
+ from langchain.text_splitter import CharacterTextSplitter
5
  from langchain.embeddings import OpenAIEmbeddings, HuggingFaceEmbeddings
6
  from langchain.vectorstores import FAISS
7
  from langchain.chat_models import ChatOpenAI
 
39
 
40
  def get_conversation_chain(vectorstore):
41
  # llm = ChatOpenAI()
42
+ llm = HuggingFaceHub(repo_id="HuggingFaceH4/zephyr-7b-beta", model_kwargs={"temperature":0.5, "max_length":512, "return_full_text":False})
43
 
44
  memory = ConversationBufferMemory(
45
  memory_key='chat_history', return_messages=True)