peterpull commited on
Commit
03520f3
·
1 Parent(s): 2dab601

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -58,8 +58,8 @@ def store_message(chatinput: str, chatresponse: str):
58
  file.write(f"{datetime.now()},{chatinput},{chatresponse}\n")
59
  print(f"Wrote to datafile: {datetime.now()},{chatinput},{chatresponse}\n")
60
 
61
- # Push back to hub every 10th time the function is called
62
- if store_message.count_calls % 10 == 0:
63
  print("Pushing back to Hugging Face model hub")
64
  # Call the push_to_hub() function to push the changes to the hub
65
  push_to_hub(commit_message="Added new chat data")
 
58
  file.write(f"{datetime.now()},{chatinput},{chatresponse}\n")
59
  print(f"Wrote to datafile: {datetime.now()},{chatinput},{chatresponse}\n")
60
 
61
+ # Push back to hub every 3th time the function is called
62
+ if store_message.count_calls % 3 == 0:
63
  print("Pushing back to Hugging Face model hub")
64
  # Call the push_to_hub() function to push the changes to the hub
65
  push_to_hub(commit_message="Added new chat data")