MarziehFadaee commited on
Commit
0f87b5f
1 Parent(s): 96ca0ee

fix shared session id

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -17,6 +17,8 @@ def generate_response(user_message, cid, history=None):
17
 
18
  if history is None:
19
  history = []
 
 
20
 
21
  history.append(user_message)
22
 
@@ -68,7 +70,7 @@ custom_css = """
68
  """
69
 
70
  with gr.Blocks(analytics_enabled=False, css=custom_css) as demo:
71
- cid = gr.State(str(uuid.uuid4()))
72
 
73
  with gr.Row():
74
  with gr.Column(scale=1):
 
17
 
18
  if history is None:
19
  history = []
20
+ if cid = "":
21
+ cid = str(uuid.uuid4())
22
 
23
  history.append(user_message)
24
 
 
70
  """
71
 
72
  with gr.Blocks(analytics_enabled=False, css=custom_css) as demo:
73
+ cid = gr.State("")
74
 
75
  with gr.Row():
76
  with gr.Column(scale=1):