Carlosito16 commited on
Commit
93ac82b
1 Parent(s): 469babf

revise account service dictionary

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -6,6 +6,7 @@ import gspread
6
  import pickle
7
  import os
8
  import csv
 
9
  import torch
10
  from tqdm.auto import tqdm
11
  from langchain.text_splitter import RecursiveCharacterTextSplitter
@@ -126,7 +127,9 @@ if "session_rating" not in st.session_state:
126
  st.session_state.session_rating = 0
127
 
128
 
129
- service_account = gspread.service_account_from_dict(st.secrets["google_sheet_credential"])
 
 
130
  workbook= service_account.open("aitGPT-qa-log")
131
  worksheet_qa = workbook.worksheet("Sheet1")
132
  worksheet_comment = workbook.worksheet("Sheet2")
 
6
  import pickle
7
  import os
8
  import csv
9
+ import json
10
  import torch
11
  from tqdm.auto import tqdm
12
  from langchain.text_splitter import RecursiveCharacterTextSplitter
 
127
  st.session_state.session_rating = 0
128
 
129
 
130
+ credentials= json.loads(st.secrets['google_sheet_credential'])
131
+
132
+ service_account = gspread.service_account_from_dict(credentials)
133
  workbook= service_account.open("aitGPT-qa-log")
134
  worksheet_qa = workbook.worksheet("Sheet1")
135
  worksheet_comment = workbook.worksheet("Sheet2")