Update app.py
Browse files
app.py
CHANGED
|
@@ -386,6 +386,7 @@ def generate(
|
|
| 386 |
|
| 387 |
# Add timestamp column
|
| 388 |
conversation_df = pd.DataFrame(conversation)
|
|
|
|
| 389 |
conversation_df['readable_sentence'] = readable_sentence
|
| 390 |
conversation_df['timestamp'] = timestamp
|
| 391 |
|
|
@@ -395,6 +396,7 @@ def generate(
|
|
| 395 |
else:
|
| 396 |
# If file doesn't exist, create new file with conversation data
|
| 397 |
conversation_df = pd.DataFrame(conversation)
|
|
|
|
| 398 |
conversation_df['readable_sentence'] = readable_sentence
|
| 399 |
conversation_df['timestamp'] = timestamp
|
| 400 |
conversation_df.to_csv(data_file, index=False)
|
|
|
|
| 386 |
|
| 387 |
# Add timestamp column
|
| 388 |
conversation_df = pd.DataFrame(conversation)
|
| 389 |
+
conversation_df['ip_address'] = request.client.host
|
| 390 |
conversation_df['readable_sentence'] = readable_sentence
|
| 391 |
conversation_df['timestamp'] = timestamp
|
| 392 |
|
|
|
|
| 396 |
else:
|
| 397 |
# If file doesn't exist, create new file with conversation data
|
| 398 |
conversation_df = pd.DataFrame(conversation)
|
| 399 |
+
conversation_df['ip_address'] = request.client.host
|
| 400 |
conversation_df['readable_sentence'] = readable_sentence
|
| 401 |
conversation_df['timestamp'] = timestamp
|
| 402 |
conversation_df.to_csv(data_file, index=False)
|