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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -11
app.py CHANGED
@@ -7,22 +7,15 @@ For more information on `huggingface_hub` Inference API support, please check th
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
  return current_messages
20
 
21
- """
22
- For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
23
- """
24
- demo = gr.ChatInterface(respond)
25
-
26
 
27
- if __name__ == "__main__":
28
- demo.launch()
 
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()