Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -46,7 +46,7 @@ def get_conversational_chain():
|
|
| 46 |
Answer:
|
| 47 |
"""
|
| 48 |
|
| 49 |
-
model = ChatGroq(temperature=0, groq_api_key="
|
| 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 =
|
| 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 |
|