import gradio as gr # with gr.Blocks(title="Lab Rat App") as demo: with open("sharelinks.txt","r") as f: lines=f.readlines() accountcreationlink=lines[0] mainstudentapp=lines[1] # adultapprover=lines[2] # labratlite=lines[3] # gr.Image(value="Lab Rat.png",show_label=False,) # gr.Label(value="Lab Rat App Launch Pad",show_label=False, color="#D6D6D6") # gr.Markdown("### When using this app, you will only navigate using the buttons in the app - do not click the back button on your browser.\n### Clicking the refresh button will reset the page and bring you back to the login screen. Any unsaved progress will be lost, so be sure to save before hitting refresh or before closing the window.") # gr.HTML("
Some features may experience issues with some versions of iOS - the signature pad is a notable example. If your signature isn't visible on the screen then it wont record properly. If you are using an iphone and experience any difficulties, please switch to a different device.>") with gr.Row(): with gr.Column(): # gr.Label(value="Student Accounts and Parent Approval",show_label=False) createbtn=gr.Button(value="Create Student Account",link=accountcreationlink) studentbtn=gr.Button(value="User Login",link=mainstudentapp) # parentbtn=gr.Button(value="Parent Approval",link=mainstudentapp) # studentlitebtn=gr.Button(value="Lab Rat Lite Student Login *",link=labratlite) # gr.Markdown("* The Lab Rat Lite app does not have full capacity to store your information. Only use the Lite version if instructed to do so by your teacher") # with gr.Column():# # gr.Label(value="School Staff, Mentors, and External Approvers",show_label=False,) # teacherbtn=gr.Button(value="Teacher Login",link=adultapprover) # adminbtn=gr.Button(value="Fair Admin Login",link=adultapprover) # qsdsbtn=gr.Button(value="Qualified Scientist and Designated Supervisor Login",link=adultapprover) # srcbtn=gr.Button(value="Scientific Review Committee (SRC) Login",link=adultapprover) # irbbtn=gr.Button(value="Institutional Review Board (IRB) Login",link=adultapprover) #reqbtn=gr.Button(value="Parameter check") #reqtb=gr.Textbox(value="none") #def checker(req:gr.Request): # params=dict(req.query_params) # print(params) # return params #reqbtn.click(checker, outputs=[reqtb]) if __name__ == "__main__": demo.launch()