Compliance_Test / app.py
dwipper's picture
Update app.py
0675bb2
raw
history blame
1.49 kB
import os
import gradio as gr
import requests
def login_auth(username, password):
if username != password:
raise gr.Error("Username not equal to Password")
with gr.Blocks() as iface:
with gr.Row(visible=False) as app_row:
with gr.Column():
with gr.Row():
with gr.Column():
gr.Markdown(value="<H2 style='text-align: center;'>NILI Compliance Desktop</h2>")
with gr.Row(visible=True) as login_row:
with gr.Column():
gr.Markdown(value="<H2 style='text-align: center;'>NILI Login</h2>")
with gr.Row():
with gr.Column(scale=2):
gr.Markdown("")
with gr.Column(scale=1, variant='panel'):
username_tbox = gr.Textbox(label="User Name", interactive=True)
password_tbox = gr.Textbox(label="Password", interactive=True, type='password')
submit_btn = gr.Button(value='Submit', variant='primary', size='sm')
submit_btn.click(login_auth, inputs=[username_tbox, password_tbox])
with gr.Column(scale=2):
gr.Markdown("")
with gr.Row():
with gr.Column(scale=4):
gr.HTML('<center><i>© 2023 Collegiate Influencer Marketing Systems, Inc.</i><br>CIMS.AI, CIMS.AI logo, NILI, NILI logo, and EzNIL are trademarks of Collegiate Influencer Marketing Systems, Inc.</center>')
iface.queue()
iface.launch(show_api=False)