Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -46,6 +46,12 @@ def store_message(chatinput: str, chatresponse: str):
|
|
| 46 |
with open(DATA_FILE, "a") as file:
|
| 47 |
file.write(f"{datetime.now()},{chatinput},{chatresponse}\n")
|
| 48 |
print(f"Wrote to datafile: {datetime.now()},{chatinput},{chatresponse}\n")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
return generate_text()
|
| 50 |
|
| 51 |
|
|
|
|
| 46 |
with open(DATA_FILE, "a") as file:
|
| 47 |
file.write(f"{datetime.now()},{chatinput},{chatresponse}\n")
|
| 48 |
print(f"Wrote to datafile: {datetime.now()},{chatinput},{chatresponse}\n")
|
| 49 |
+
repo.git.add(DATA_FILE)
|
| 50 |
+
repo.git.commit('-m', 'Update data.txt')
|
| 51 |
+
print("Committed changes to local repository")
|
| 52 |
+
repo.git.push()
|
| 53 |
+
print("Pushed changes to remote repository")
|
| 54 |
+
|
| 55 |
return generate_text()
|
| 56 |
|
| 57 |
|