Update app.py
Browse files
app.py
CHANGED
@@ -92,7 +92,12 @@ def format_prompt(prompt,retrieved_documents,k,history,memory_limit=3):
|
|
92 |
|
93 |
with open('file.txt','w+') as data:
|
94 |
data.write(str(historylog))
|
95 |
-
|
|
|
|
|
|
|
|
|
|
|
96 |
|
97 |
print(historylog)
|
98 |
return PROMPT
|
|
|
92 |
|
93 |
with open('file.txt','w+') as data:
|
94 |
data.write(str(historylog))
|
95 |
+
|
96 |
+
from huggingface_hub import HfApi
|
97 |
+
api = HfApi()
|
98 |
+
api.upload_file(
|
99 |
+
path_or_fileobj=file.txt
|
100 |
+
)
|
101 |
|
102 |
print(historylog)
|
103 |
return PROMPT
|