peterpull commited on
Commit
ba37f7c
·
1 Parent(s): cf13932

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -32,7 +32,7 @@ def generate_text() -> str:
32
  with open(DATA_FILE) as file:
33
  text = ""
34
  for line in file:
35
- row_parts = line.strip().split(";")
36
  if len(row_parts) != 3:
37
  continue
38
  user, chatbot, time = row_parts
@@ -43,7 +43,7 @@ def store_message(chatinput: str, chatresponse: str):
43
  if chatinput and chatresponse:
44
  with open(DATA_FILE, "a") as file:
45
  file.write(f"{datetime.now()},{chatinput},{chatresponse}\n")
46
-
47
  return generate_text()
48
 
49
 
 
32
  with open(DATA_FILE) as file:
33
  text = ""
34
  for line in file:
35
+ row_parts = line.strip().split(",")
36
  if len(row_parts) != 3:
37
  continue
38
  user, chatbot, time = row_parts
 
43
  if chatinput and chatresponse:
44
  with open(DATA_FILE, "a") as file:
45
  file.write(f"{datetime.now()},{chatinput},{chatresponse}\n")
46
+ print("wrote to datafile:{datetime.now()},{chatinput},{chatresponse}\n" )
47
  return generate_text()
48
 
49