Huzaifa367 commited on
Commit
a005cbe
·
verified ·
1 Parent(s): a015168

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -46,7 +46,7 @@ def get_conversational_chain():
46
  Answer:
47
  """
48
 
49
- model = ChatGroq(temperature=0, groq_api_key="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", model_name="llama3-8b-8192")
50
 
51
  prompt = PromptTemplate(template=prompt_template, input_variables=["context", "question"])
52
  chain = load_qa_chain(model, chain_type="stuff", prompt=prompt)
@@ -82,7 +82,7 @@ def main():
82
  st.set_page_config("Chat PDF")
83
  st.header("Chat with PDF")
84
 
85
- api_key = os.environ["inference_api_key"]
86
 
87
  user_question = st.text_input("Ask a Question from the PDF Files")
88
 
 
46
  Answer:
47
  """
48
 
49
+ model = ChatGroq(temperature=0, groq_api_key=os.environ["groq_api_key"], model_name="llama3-8b-8192")
50
 
51
  prompt = PromptTemplate(template=prompt_template, input_variables=["context", "question"])
52
  chain = load_qa_chain(model, chain_type="stuff", prompt=prompt)
 
82
  st.set_page_config("Chat PDF")
83
  st.header("Chat with PDF")
84
 
85
+ api_key = st.secret["inference_api_key"]
86
 
87
  user_question = st.text_input("Ask a Question from the PDF Files")
88