jonathanjordan21 commited on
Commit
e454ccf
·
verified ·
1 Parent(s): 6a8ac6d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -51,8 +51,14 @@ def respond(
51
  ):
52
  global codes_emb
53
 
54
- for his in history:
55
- message += "\n" + his[0]
 
 
 
 
 
 
56
 
57
  # pattern = r'\b([A-Z]{1,2})\s?(\d{4})\s?([A-Z]{3})\b'
58
  pattern = r'\b([A-Z]{1,2})\s?(\d{4})\s?([A-Z]{1,3})\b'
 
51
  ):
52
  global codes_emb
53
 
54
+ if history[-1][-1][21:24] == "033":
55
+ list_his = ""
56
+ for his in history[::-1][1:]:
57
+ if his[-1][21:24] != "033":
58
+ break
59
+ list_his = his[0] + "\n" + list_his
60
+
61
+ message += "\n" + list_his
62
 
63
  # pattern = r'\b([A-Z]{1,2})\s?(\d{4})\s?([A-Z]{3})\b'
64
  pattern = r'\b([A-Z]{1,2})\s?(\d{4})\s?([A-Z]{1,3})\b'