Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -70,13 +70,13 @@ LOGIN_BUTTON = """
|
|
70 |
LOGOUT_BUTTON = """
|
71 |
<div id="container">
|
72 |
<button id="sign-out" style="display: none;">Sign Out</button>
|
73 |
-
<pre id="json-output" style="display: none;">{}</pre>
|
74 |
</div>
|
75 |
"""
|
76 |
|
77 |
@app.get("/", response_class=HTMLResponse)
|
78 |
def page():
|
79 |
oauth_info = parse_huggingface_oauth(request)
|
80 |
-
return HTML_ROOT.format(content=LOGOUT_BUTTON if oauth_info is not None else LOGIN_BUTTON)
|
81 |
|
82 |
attach_huggingface_oauth(app)
|
|
|
70 |
LOGOUT_BUTTON = """
|
71 |
<div id="container">
|
72 |
<button id="sign-out" style="display: none;">Sign Out</button>
|
73 |
+
<pre id="json-output" style="display: none;">{oauth_info}</pre>
|
74 |
</div>
|
75 |
"""
|
76 |
|
77 |
@app.get("/", response_class=HTMLResponse)
|
78 |
def page():
|
79 |
oauth_info = parse_huggingface_oauth(request)
|
80 |
+
return HTML_ROOT.format(content=LOGOUT_BUTTON.format(oauth_info=oauth_info) if oauth_info is not None else LOGIN_BUTTON)
|
81 |
|
82 |
attach_huggingface_oauth(app)
|