Neurolingua commited on
Commit
48585d6
·
verified ·
1 Parent(s): 979aaae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -12
app.py CHANGED
@@ -28,18 +28,7 @@ if not os.path.exists(UPLOAD_FOLDER):
28
 
29
  app.config['UPLOAD_FOLDER'] = UPLOAD_FOLDER
30
 
31
- class ConversationBufferMemory:
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