Update app.py
Browse files341 unmodified lines342343344345345346347348349350351352341 unmodified lines answer = generate_chunked_response(model, formatted_prompt) else: if database is None: if not os.path.exists("faiss_database"): return "No documents available. Please upload documents or enable web search to answer questions."
database = FAISS.load_local("faiss_database", embed, allow_dangerous_deserialization=True)
history_str = "\n".join([f"Q: {item['question']}\nA: {item['answer']}" for item in conversation_history])
if is_related_to_history(question, conversation_history):app.py+3-1