Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -60,7 +60,7 @@ from langchain_openai import OpenAI
|
|
| 60 |
template = """You are a chatbot having a conversation with a human.
|
| 61 |
|
| 62 |
Given the following extracted parts of a long document and a question, create a final answer based on the document ONLY and NOTHING else.
|
| 63 |
-
|
| 64 |
|
| 65 |
{context}
|
| 66 |
|
|
@@ -99,8 +99,6 @@ def write_to_file(file_name,content):
|
|
| 99 |
|
| 100 |
with fs.open(file_path, "w") as file:
|
| 101 |
file.write(f"{content_old}\n" + content)
|
| 102 |
-
|
| 103 |
-
# Example usage
|
| 104 |
|
| 105 |
|
| 106 |
def vote(tmp, index_state, data: gr.LikeData):
|
|
|
|
| 60 |
template = """You are a chatbot having a conversation with a human.
|
| 61 |
|
| 62 |
Given the following extracted parts of a long document and a question, create a final answer based on the document ONLY and NOTHING else.
|
| 63 |
+
If You cannot find the answer say "The document does not contain that information."
|
| 64 |
|
| 65 |
{context}
|
| 66 |
|
|
|
|
| 99 |
|
| 100 |
with fs.open(file_path, "w") as file:
|
| 101 |
file.write(f"{content_old}\n" + content)
|
|
|
|
|
|
|
| 102 |
|
| 103 |
|
| 104 |
def vote(tmp, index_state, data: gr.LikeData):
|