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="
NILI Compliance Desktop
")
with gr.Row(visible=True) as login_row:
with gr.Column():
gr.Markdown(value="NILI Login
")
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('© 2023 Collegiate Influencer Marketing Systems, Inc.
CIMS.AI, CIMS.AI logo, NILI, NILI logo, and EzNIL are trademarks of Collegiate Influencer Marketing Systems, Inc.')
iface.queue()
iface.launch(show_api=False)