Spaces:
Runtime error
Runtime error
elfsong
commited on
Commit
β’
a0f09fb
1
Parent(s):
39f2ddf
update
Browse files
app.py
CHANGED
@@ -5,10 +5,10 @@ from google.oauth2 import service_account
|
|
5 |
|
6 |
def auth():
|
7 |
with open("/tmp/token.json", "w") as token_f:
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
|
13 |
return credentials
|
14 |
|
@@ -30,7 +30,7 @@ st.title("Lucky Reactor")
|
|
30 |
|
31 |
credentials = auth()
|
32 |
status = True
|
33 |
-
st.markdown("credentials: "
|
34 |
|
35 |
st.image("cover.jpg", caption="Reactor is currently " + "running π" if status else "sleeping π΄" + ".")
|
36 |
|
|
|
5 |
|
6 |
def auth():
|
7 |
with open("/tmp/token.json", "w") as token_f:
|
8 |
+
google_key = os.getenv["GOOGLE_KEY"]
|
9 |
+
token_f.write(google_key)
|
10 |
+
|
11 |
+
credentials = service_account.Credentials.from_service_account_file('/tmp/token.json')
|
12 |
|
13 |
return credentials
|
14 |
|
|
|
30 |
|
31 |
credentials = auth()
|
32 |
status = True
|
33 |
+
st.markdown("credentials: " + credentials)
|
34 |
|
35 |
st.image("cover.jpg", caption="Reactor is currently " + "running π" if status else "sleeping π΄" + ".")
|
36 |
|