soojeongcrystal commited on
Commit
1ef3ff8
·
verified ·
1 Parent(s): e241071

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -5
app.py CHANGED
@@ -4,19 +4,15 @@ import gspread
4
  from oauth2client.service_account import ServiceAccountCredentials
5
  from datetime import datetime
6
 
7
- # Set page title and favicon
8
  st.set_page_config(page_title="고민 해결사", page_icon=":sunglasses:")
9
 
10
- # Google Sheets 인증 설정
11
  scope = ["https://spreadsheets.google.com/feeds", "https://www.googleapis.com/auth/spreadsheets",
12
  "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive"]
13
- creds = ServiceAccountCredentials.from_json_keyfile_name("/Users/crystal/generation/analog-marking-416002-e369840763fa.json", scope)
14
  client = gspread.authorize(creds)
15
 
16
- # Google Sheets 문서 열기
17
  sheet = client.open("generation_streamlit_0302").sheet1
18
 
19
- # 사용자 조언 데이터를 Google Sheets 문서에 추가하는 함수
20
  def record_advice(concern, advice):
21
  timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
22
  sheet.append_row([timestamp, concern, advice])
 
4
  from oauth2client.service_account import ServiceAccountCredentials
5
  from datetime import datetime
6
 
 
7
  st.set_page_config(page_title="고민 해결사", page_icon=":sunglasses:")
8
 
 
9
  scope = ["https://spreadsheets.google.com/feeds", "https://www.googleapis.com/auth/spreadsheets",
10
  "https://www.googleapis.com/auth/drive.file", "https://www.googleapis.com/auth/drive"]
11
+ creds = ServiceAccountCredentials.from_json_keyfile_name("analog-marking-416002-e369840763fa.json", scope)
12
  client = gspread.authorize(creds)
13
 
 
14
  sheet = client.open("generation_streamlit_0302").sheet1
15
 
 
16
  def record_advice(concern, advice):
17
  timestamp = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
18
  sheet.append_row([timestamp, concern, advice])