MarziehFadaee commited on
Commit
cc575f5
·
verified ·
1 Parent(s): 53d2d87

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -12,13 +12,13 @@ co = cohere.Client(cohere_api_key)
12
 
13
  history = []
14
  chat = []
 
15
 
16
  def trigger_example(example):
17
  chat, updated_history = generate_response(example)
18
  return chat, updated_history
19
 
20
  def generate_response(user_message, history=None):
21
- global cid
22
 
23
  if history is None:
24
  history = []
@@ -48,7 +48,6 @@ def generate_response(user_message, history=None):
48
 
49
 
50
  def clear_chat():
51
- global cid
52
  cid = str(uuid.uuid4())
53
  return [], []
54
 
 
12
 
13
  history = []
14
  chat = []
15
+ cid = str(uuid.uuid4())
16
 
17
  def trigger_example(example):
18
  chat, updated_history = generate_response(example)
19
  return chat, updated_history
20
 
21
  def generate_response(user_message, history=None):
 
22
 
23
  if history is None:
24
  history = []
 
48
 
49
 
50
  def clear_chat():
 
51
  cid = str(uuid.uuid4())
52
  return [], []
53