Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -27,11 +27,11 @@ try:
|
|
27 |
except:
|
28 |
print("file not found")
|
29 |
|
30 |
-
def AIMemory(
|
31 |
-
if
|
32 |
with open(DATA_FILE, "a") as csvfile:
|
33 |
-
writer = csv.DictWriter(csvfile, fieldnames=["
|
34 |
-
writer.writerow({"
|
35 |
commit_url = repo.push_to_hub()
|
36 |
return ""
|
37 |
|
|
|
27 |
except:
|
28 |
print("file not found")
|
29 |
|
30 |
+
def AIMemory(title: str, story: str):
|
31 |
+
if title and story:
|
32 |
with open(DATA_FILE, "a") as csvfile:
|
33 |
+
writer = csv.DictWriter(csvfile, fieldnames=["title", "story", "time"])
|
34 |
+
writer.writerow({"title": name, "story": message, "time": str(datetime.now())})
|
35 |
commit_url = repo.push_to_hub()
|
36 |
return ""
|
37 |
|