Spaces:
Runtime error
Runtime error
Update app.py
Browse files
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
|
| 62 |
-
if store_message.count_calls %
|
| 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")
|