Spaces:
Paused
Paused
Carlosito16
commited on
Commit
·
fda2da6
1
Parent(s):
ce86648
deactivate worksheet
Browse files
app.py
CHANGED
@@ -170,7 +170,7 @@ def retrieve_answer():
|
|
170 |
"rating":0 }
|
171 |
|
172 |
st.session_state.history.append(log)
|
173 |
-
update_worksheet_qa()
|
174 |
st.session_state.chat_history.append({"message": st.session_state.my_text_input, "is_user": True})
|
175 |
st.session_state.chat_history.append({"message": answer[6:] , "is_user": False})
|
176 |
|
@@ -191,7 +191,7 @@ def new_retrieve_answer():
|
|
191 |
|
192 |
print(answer["chat_history"])
|
193 |
st.session_state.history.append(log)
|
194 |
-
update_worksheet_qa()
|
195 |
st.session_state.chat_history.append({"message": st.session_state.my_text_input, "is_user": True})
|
196 |
st.session_state.chat_history.append({"message": answer['answer'][6:] , "is_user": False})
|
197 |
|
@@ -245,13 +245,13 @@ if "chat_history" not in st.session_state: #this one is to pass previous message
|
|
245 |
# st.session_state.session_rating = 0
|
246 |
|
247 |
|
248 |
-
credentials= json.loads(st.secrets['google_sheet_credential'])
|
249 |
|
250 |
-
service_account = gspread.service_account_from_dict(credentials)
|
251 |
-
workbook= service_account.open("aitGPT-qa-log")
|
252 |
-
worksheet_qa = workbook.worksheet("Sheet1")
|
253 |
-
worksheet_comment = workbook.worksheet("Sheet2")
|
254 |
-
datetime_format= "%Y-%m-%d %H:%M:%S"
|
255 |
|
256 |
|
257 |
|
|
|
170 |
"rating":0 }
|
171 |
|
172 |
st.session_state.history.append(log)
|
173 |
+
# update_worksheet_qa()
|
174 |
st.session_state.chat_history.append({"message": st.session_state.my_text_input, "is_user": True})
|
175 |
st.session_state.chat_history.append({"message": answer[6:] , "is_user": False})
|
176 |
|
|
|
191 |
|
192 |
print(answer["chat_history"])
|
193 |
st.session_state.history.append(log)
|
194 |
+
# update_worksheet_qa()
|
195 |
st.session_state.chat_history.append({"message": st.session_state.my_text_input, "is_user": True})
|
196 |
st.session_state.chat_history.append({"message": answer['answer'][6:] , "is_user": False})
|
197 |
|
|
|
245 |
# st.session_state.session_rating = 0
|
246 |
|
247 |
|
248 |
+
# credentials= json.loads(st.secrets['google_sheet_credential'])
|
249 |
|
250 |
+
# service_account = gspread.service_account_from_dict(credentials)
|
251 |
+
# workbook= service_account.open("aitGPT-qa-log")
|
252 |
+
# worksheet_qa = workbook.worksheet("Sheet1")
|
253 |
+
# worksheet_comment = workbook.worksheet("Sheet2")
|
254 |
+
# datetime_format= "%Y-%m-%d %H:%M:%S"
|
255 |
|
256 |
|
257 |
|