PebinAPJ commited on
Commit
f22d971
·
verified ·
1 Parent(s): 1378504

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -4
app.py CHANGED
@@ -9,10 +9,7 @@ from langchain.memory import ConversationBufferMemory
9
  from langchain.chains import ConversationalRetrievalChain
10
  from htmlTemplates import css, bot_template, user_template
11
  from langchain.llms import HuggingFaceHub
12
- import os
13
 
14
- # Fetch the API token from the environment
15
- huggingface_token = os.getenv("HUGGINGFACEHUB_API_TOKEN")
16
 
17
 
18
 
@@ -46,7 +43,7 @@ def get_vectorstore(text_chunks):
46
 
47
  def get_conversation_chain(vectorstore):
48
  # llm = ChatOpenAI()
49
- llm = HuggingFaceHub(repo_id="google/flan-t5-xxl", model_kwargs={"temperature":0.5, "max_length":512},huggingfacehub_api_token=huggingface_token)
50
 
51
  memory = ConversationBufferMemory(
52
  memory_key='chat_history', return_messages=True)
 
9
  from langchain.chains import ConversationalRetrievalChain
10
  from htmlTemplates import css, bot_template, user_template
11
  from langchain.llms import HuggingFaceHub
 
12
 
 
 
13
 
14
 
15
 
 
43
 
44
  def get_conversation_chain(vectorstore):
45
  # llm = ChatOpenAI()
46
+ llm = HuggingFaceHub(repo_id="google/flan-t5-xxl", model_kwargs={"temperature":0.5, "max_length":512})
47
 
48
  memory = ConversationBufferMemory(
49
  memory_key='chat_history', return_messages=True)