Spaces:
Sleeping
Sleeping
Neurolingua
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -28,18 +28,7 @@ if not os.path.exists(UPLOAD_FOLDER):
|
|
28 |
|
29 |
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
|
30 |
|
31 |
-
|
32 |
-
def __init__(self, max_size=6):
|
33 |
-
self.memory = []
|
34 |
-
self.max_size = max_size
|
35 |
-
|
36 |
-
def add_to_memory(self, interaction):
|
37 |
-
self.memory.append(interaction)
|
38 |
-
if len(self.memory) > self.max_size:
|
39 |
-
self.memory.pop(0)
|
40 |
-
|
41 |
-
def get_memory(self):
|
42 |
-
return self.memory
|
43 |
|
44 |
conversation_memory = ConversationBufferMemory(max_size=2)
|
45 |
|
|
|
28 |
|
29 |
app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
|
30 |
|
31 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
32 |
|
33 |
conversation_memory = ConversationBufferMemory(max_size=2)
|
34 |
|