Update app.py
Browse files647 unmodified lines64864965065165265365415 unmodified lines670671672673674675676647 unmodified linesmodel = get_model(temperature, top_p, repetition_penalty)embed = get_embeddings()# Check if the FAISS database existsif os.path.exists("faiss_database"):database = FAISS.load_local("faiss_database", embed, allow_dangerous_deserialization=True)else:15 unmodified linesdatabase.save_local("faiss_database")context_str = "\n".join([doc.page_content for doc in web_docs])prompt_template = """Answer the question based on the following web search results:647 unmodified lines64864965065165265315 unmodified lines669670671672673674675647 unmodified linesmodel = get_model(temperature, top_p, repetition_penalty)embed = get_embeddings()if os.path.exists("faiss_database"):database = FAISS.load_local("faiss_database", embed, allow_dangerous_deserialization=True)else:15 unmodified linesdatabase.save_local("faiss_database")context_str = "\n".join([f"Source: {doc.metadata['source']}\nContent: {doc.page_content}" for doc in web_docs])prompt_template = """Answer the question based on the following web search results:
app.py+1-2