Download app.py from vanchruis/Test: direct link, hf CLI and curl.
- Browser
- Download file 547 Bytes
-
https://huggingface.co/spaces/vanchruis/Test/resolve/main/app.py
- Command line
-
hf download hf://spaces/vanchruis/Test/app.py
-
curl -L -o app.py https://huggingface.co/spaces/vanchruis/Test/resolve/main/app.py
547 Bytes
| import os | |
| import gradio as gr | |
| from dotenv import load_dotenv | |
| load_dotenv() | |
| users=os.getenv("user") | |
| pasword=os.getenv("pas") | |
| def main (ussr,passw) : | |
| if ussr == users and passw == pasword : | |
| return "welcome" | |
| else : | |
| return " pasword salah" | |
| with gr.Blocks() as demo : | |
| with gr.Row (): | |
| int_user=gr.Textbox(label="user") | |
| int_pas=gr.Textbox(label="pasword",type="password") | |
| tombol=gr.Button("login") | |
| hasil=gr.Textbox(label="hasil") | |
| tombol.click ( | |
| fn=main, | |
| inputs=[int_user,int_pas], | |
| outputs=hasil) | |
| demo.launch() |