Namitg02 commited on
Commit
afa4eb1
·
verified ·
1 Parent(s): d76d2e1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -18
app.py CHANGED
@@ -47,25 +47,12 @@ print("check1")
47
  question = "How can I reverse Diabetes?"
48
 
49
 
50
- template = """Use the following pieces of context to answer the question at the end. If you don't know the answer, just say that you don't know, don't try to make up an answer. Use three sentences maximum. Keep the answer as concise as possible. Always say "thanks for asking!" at the end of the answer.
51
- {context}
52
- Question: {question}
53
- Helpful Answer:"""
54
 
55
- QA_CHAIN_PROMPT = PromptTemplate(input_variables=["context", "question"],template=template)
56
-
57
-
58
-
59
- #qa_chat_prompt = ChatPromptTemplate.from_messages(
60
- #[
61
- # SystemMessage(
62
- # content=(
63
- # "You are a Diabetes eductaor that provide advice to patients."
64
- # )
65
- # ),
66
- # HumanMessagePromptTemplate.from_template("{context}"),
67
- #]
68
- #)
69
 
70
  from transformers import AutoTokenizer
71
  from transformers import AutoModelForCausalLM
 
47
  question = "How can I reverse Diabetes?"
48
 
49
 
50
+ #template = """Use the following pieces of context to answer the question at the end. If you don't know the answer, just say that you don't know, don't try to make up an answer. Use three sentences maximum. Keep the answer as concise as possible. Always say "thanks for asking!" at the end of the answer.
51
+ #{context}
52
+ #Question: {question}
53
+ #Helpful Answer:"""
54
 
55
+ #QA_CHAIN_PROMPT = PromptTemplate(input_variables=["context", "question"],template=template)
 
 
 
 
 
 
 
 
 
 
 
 
 
56
 
57
  from transformers import AutoTokenizer
58
  from transformers import AutoModelForCausalLM