Spaces:
Runtime error
Runtime error
Commit
·
3b29a44
1
Parent(s):
bcfb892
update clear function
Browse files
app.py
CHANGED
|
@@ -1320,12 +1320,16 @@ def fake(message, history4):
|
|
| 1320 |
|
| 1321 |
|
| 1322 |
def clearall():
|
| 1323 |
-
|
| 1324 |
-
|
|
|
|
|
|
|
|
|
|
| 1325 |
# memory_openai.clear()
|
| 1326 |
-
# memory.clear()
|
| 1327 |
global Filename_Chatbot
|
| 1328 |
Filename_Chatbot = []
|
|
|
|
|
|
|
| 1329 |
return [[], gr.update(visible=True), gr.update(visible=False), []]
|
| 1330 |
|
| 1331 |
def retry(history3):
|
|
|
|
| 1320 |
|
| 1321 |
|
| 1322 |
def clearall():
|
| 1323 |
+
global memory2
|
| 1324 |
+
try:
|
| 1325 |
+
memory2.clear()
|
| 1326 |
+
except Exception as e:
|
| 1327 |
+
print("memory error:", e)
|
| 1328 |
# memory_openai.clear()
|
|
|
|
| 1329 |
global Filename_Chatbot
|
| 1330 |
Filename_Chatbot = []
|
| 1331 |
+
with open("output.log", "w") as file:
|
| 1332 |
+
file.write("")
|
| 1333 |
return [[], gr.update(visible=True), gr.update(visible=False), []]
|
| 1334 |
|
| 1335 |
def retry(history3):
|