Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -71,9 +71,9 @@ def main():
|
|
71 |
model_kwargs={'temperature':0.01,"max_length": 2048,},
|
72 |
huggingfacehub_api_token=token)
|
73 |
llm = hub_llm
|
74 |
-
chain = load_qa_chain(llm, chain_type="
|
75 |
with get_openai_callback() as cb:
|
76 |
-
response = chain.run(input_documents=docs, question=user_question)
|
77 |
# print(cb)
|
78 |
|
79 |
st.write(response)
|
|
|
71 |
model_kwargs={'temperature':0.01,"max_length": 2048,},
|
72 |
huggingfacehub_api_token=token)
|
73 |
llm = hub_llm
|
74 |
+
chain = load_qa_chain(llm, chain_type="map_reduce")
|
75 |
with get_openai_callback() as cb:
|
76 |
+
response = chain.run(input_documents=docs, question=[user_question])
|
77 |
# print(cb)
|
78 |
|
79 |
st.write(response)
|