Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
changes'
Browse files
app.py
CHANGED
|
@@ -38,11 +38,12 @@ def get_user(request: Request):
|
|
| 38 |
def public(request: Request, user: dict = Depends(get_user)):
|
| 39 |
root_url = gr.route_utils.get_root_url(request, "/", None)
|
| 40 |
root_url = root_url.replace("http://", "https://")
|
| 41 |
-
print(">>>>>>>", root_url)
|
| 42 |
if user:
|
| 43 |
return RedirectResponse(url=f"{root_url}/gradio")
|
| 44 |
else:
|
| 45 |
-
|
|
|
|
|
|
|
| 46 |
|
| 47 |
@app.route('/logout')
|
| 48 |
async def logout(request: Request):
|
|
|
|
| 38 |
def public(request: Request, user: dict = Depends(get_user)):
|
| 39 |
root_url = gr.route_utils.get_root_url(request, "/", None)
|
| 40 |
root_url = root_url.replace("http://", "https://")
|
|
|
|
| 41 |
if user:
|
| 42 |
return RedirectResponse(url=f"{root_url}/gradio")
|
| 43 |
else:
|
| 44 |
+
redirect_url = f"{root_url}/login-demo"
|
| 45 |
+
print("Redirecting to", redirect_url)
|
| 46 |
+
return RedirectResponse(url=redirect_url)
|
| 47 |
|
| 48 |
@app.route('/logout')
|
| 49 |
async def logout(request: Request):
|