File size: 1,494 Bytes
047277b
 
 
 
 
 
0675bb2
 
047277b
e95ec56
047277b
 
 
afc7c0b
047277b
 
 
a9d0df6
047277b
 
 
 
 
 
 
0675bb2
047277b
 
 
 
 
 
a93f9bf
bf0c795
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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)