Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,10 +34,12 @@ def chatbot(input_text, mentioned_person='Mediator John Haynes'):
|
|
| 34 |
if not os.path.exists(chat_log_dir):
|
| 35 |
os.makedirs(chat_log_dir)
|
| 36 |
chat_log_filepath = os.path.join(chat_log_dir, chat_log_filename)
|
|
|
|
| 37 |
with open(chat_log_filepath, "a") as f:
|
| 38 |
f.write(f"Chat at {current_time_str}\n")
|
| 39 |
f.write(f"User: {input_text}\n")
|
| 40 |
f.write(f"Chatbot: {response.response}\n\n")
|
|
|
|
| 41 |
|
| 42 |
# return the response
|
| 43 |
return response.response
|
|
|
|
| 34 |
if not os.path.exists(chat_log_dir):
|
| 35 |
os.makedirs(chat_log_dir)
|
| 36 |
chat_log_filepath = os.path.join(chat_log_dir, chat_log_filename)
|
| 37 |
+
print(f"chat log filepath: {chat_log_filepath}")
|
| 38 |
with open(chat_log_filepath, "a") as f:
|
| 39 |
f.write(f"Chat at {current_time_str}\n")
|
| 40 |
f.write(f"User: {input_text}\n")
|
| 41 |
f.write(f"Chatbot: {response.response}\n\n")
|
| 42 |
+
print(f"Chat log written to {chat_log_filepath}")
|
| 43 |
|
| 44 |
# return the response
|
| 45 |
return response.response
|