Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,6 +3,7 @@ import os
|
|
3 |
import streamlit as st
|
4 |
import configparser
|
5 |
import datetime
|
|
|
6 |
import atexit
|
7 |
import pickle
|
8 |
import streamlit.components.v1 as components
|
@@ -266,8 +267,16 @@ def main():
|
|
266 |
st.write("**Answer:**")
|
267 |
st.write(ai_response)
|
268 |
|
|
|
|
|
269 |
|
270 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
271 |
|
272 |
# Specify the filename you want to append to
|
273 |
filename = "output.txt"
|
|
|
3 |
import streamlit as st
|
4 |
import configparser
|
5 |
import datetime
|
6 |
+
from datetime import datetime
|
7 |
import atexit
|
8 |
import pickle
|
9 |
import streamlit.components.v1 as components
|
|
|
267 |
st.write("**Answer:**")
|
268 |
st.write(ai_response)
|
269 |
|
270 |
+
# Get the current date and time
|
271 |
+
current_datetime = datetime.now()
|
272 |
|
273 |
+
# Format the date in the desired format, for example, "January 20, 2024"
|
274 |
+
date_string = current_datetime.strftime("%B %d, %Y")
|
275 |
+
|
276 |
+
# Your combined string with the current date included
|
277 |
+
combined_string = f"Question: {user_query}\n\nAnswer: {ai_response}\n\nDate: {date_string}"
|
278 |
+
|
279 |
+
|
280 |
|
281 |
# Specify the filename you want to append to
|
282 |
filename = "output.txt"
|