Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -45,8 +45,7 @@ def store_message(name: str, message: str, outputfileName: str):
|
|
45 |
with open(savePath, "w") as f: #write
|
46 |
f.write(str("time, message, text\n")) # one time only to get column headers for CSV file
|
47 |
if name and message:
|
48 |
-
|
49 |
-
writer = csv.DictWriter(csvfile, fieldnames=[ "time", "message", "name", ])
|
50 |
writer.writerow(
|
51 |
{"time": str(datetime.now()), "message": message.strip(), "name": name.strip() }
|
52 |
)
|
|
|
45 |
with open(savePath, "w") as f: #write
|
46 |
f.write(str("time, message, text\n")) # one time only to get column headers for CSV file
|
47 |
if name and message:
|
48 |
+
writer = csv.DictWriter(f, fieldnames=["time", "message", "name"])
|
|
|
49 |
writer.writerow(
|
50 |
{"time": str(datetime.now()), "message": message.strip(), "name": name.strip() }
|
51 |
)
|