paolosandejas-stratpoint commited on
Commit
bf9eead
·
verified ·
1 Parent(s): eda8d44

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -4
app.py CHANGED
@@ -7,15 +7,21 @@ For more information on `huggingface_hub` Inference API support, please check th
7
  current_messages = []
8
 
9
 
10
- def memory_test(message, history):
 
 
 
11
  # messages = [{"role": "system", "content": system_message}]
12
 
13
  current_messages.append(message)
14
  print(message)
15
  print(history)
16
  print(current_messages)
17
- return current_messages
18
 
19
 
20
- demo = gr.ChatInterface(fn=memory_test, title="memory test")
21
- demo.launch()
 
 
 
 
7
  current_messages = []
8
 
9
 
10
+ def respond(
11
+ message,
12
+ history: list[tuple[str, str]]
13
+ ):
14
  # messages = [{"role": "system", "content": system_message}]
15
 
16
  current_messages.append(message)
17
  print(message)
18
  print(history)
19
  print(current_messages)
20
+ return str(current_messages)
21
 
22
 
23
+ demo = gr.ChatInterface(fn=respond, title="memory_test")
24
+
25
+
26
+ if __name__ == "__main__":
27
+ demo.launch()