ahmadmac commited on
Commit
fbc35a3
·
verified ·
1 Parent(s): 1ff1f65

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -10,6 +10,15 @@ from langchain_community.vectorstores import Qdrant
10
  from langchain.chains import RetrievalQA
11
  from langchain.llms import HuggingFaceHub
12
  hf_token=os.environ["HUGGINGFACEHUB_API_TOKEN"]
 
 
 
 
 
 
 
 
 
13
  prompt_template = """ you are a highly knowledgeable AI assistant. Engage in a conversation with the user. Your main goal is to provide clear and informative answers to the user's questions.
14
  User: {question}
15
  Assistant:"""
 
10
  from langchain.chains import RetrievalQA
11
  from langchain.llms import HuggingFaceHub
12
  hf_token=os.environ["HUGGINGFACEHUB_API_TOKEN"]
13
+ model_name_or_path = "ahmadmac/Trained-T5-large"
14
+ pipe = pipeline(
15
+ 'text2text-generation',
16
+ model=model_name_or_path,
17
+ max_length=512,
18
+ do_sample=True,
19
+ temperature=1.0
20
+ )
21
+ llm = HuggingFacePipeline(pipeline=pipe)
22
  prompt_template = """ you are a highly knowledgeable AI assistant. Engage in a conversation with the user. Your main goal is to provide clear and informative answers to the user's questions.
23
  User: {question}
24
  Assistant:"""