blazingbunny commited on
Commit
f51c203
·
verified ·
1 Parent(s): 01af3f9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -1,15 +1,14 @@
1
  import streamlit as st
2
- from google.oauth2 import service_account
3
- from google_auth_oauthlib.flow import Flow
4
  import json
5
 
6
  # Function to create Google OAuth Flow object
7
  def create_flow():
8
  client_secret = st.secrets["client_secret"]
9
- return Flow.from_client_secrets_file(
10
- client_secret,
11
  scopes=['https://www.googleapis.com/auth/userinfo.profile', 'https://www.googleapis.com/auth/userinfo.email'],
12
- redirect_uri='https://huggingface.co/spaces/blazingbunny/galerts:8501'
13
  )
14
 
15
  # Function to generate Google Sign-In URL
 
1
  import streamlit as st
2
+ from google.auth_oauthlib.flow import Flow
 
3
  import json
4
 
5
  # Function to create Google OAuth Flow object
6
  def create_flow():
7
  client_secret = st.secrets["client_secret"]
8
+ return Flow.from_client_config(
9
+ json.loads(client_secret),
10
  scopes=['https://www.googleapis.com/auth/userinfo.profile', 'https://www.googleapis.com/auth/userinfo.email'],
11
+ redirect_uri='https://huggingface.co/spaces/blazingbunny:8501'
12
  )
13
 
14
  # Function to generate Google Sign-In URL