Spaces:
Build error
Build error
Download app_wrapper.py from hysts-samples/login-to-render: direct link, hf CLI and curl.
- Browser
- Download file 421 Bytes
-
https://huggingface.co/spaces/hysts-samples/login-to-render/resolve/main/app_wrapper.py
- Command line
-
hf download hf://spaces/hysts-samples/login-to-render/app_wrapper.py
-
curl -L -o app_wrapper.py https://huggingface.co/spaces/hysts-samples/login-to-render/resolve/main/app_wrapper.py
421 Bytes
| #!/usr/bin/env python | |
| import gradio as gr | |
| from app import demo as main_demo | |
| def render(profile: gr.OAuthProfile | None) -> dict: | |
| return gr.Column(visible=profile is not None) | |
| with gr.Blocks() as demo: | |
| gr.LoginButton() | |
| with gr.Column(visible=False) as col: | |
| main_demo.render() | |
| demo.load(fn=render, outputs=col) | |
| if __name__ == "__main__": | |
| demo.queue(api_open=False).launch(show_api=False) | |