brandfolder_image_upload / change_ui.py
mylesai's picture
Update change_ui.py
8dec5ec verified
raw
history blame
1.78 kB
import gradio as gr
def move_to_next_view():
return (
gr.update(visible=False),
gr.update(visible=True),
)
def back_to_previous_view():
return (
gr.update(visible=True),
gr.update(visible=False),
)
login_to_zipfile_js = """
function login_to_zipfile() {
document.querySelector("#login").style.display = "none";
document.querySelector("#zipfile").style.display = "flex";
}
"""
zipfile_to_login_js = """
function zipfile_to_login() {
document.querySelector("#login").style.display = "flex";
document.querySelector("#zipfile").style.display = "none";
}
"""
zipfile_to_trigger_js = """
function zipfile_to_trigger() {
document.querySelector("#zipfile").style.display = "none";
document.querySelector("#trigger").style.display = "flex";
}
"""
trigger_to_zipfile_js = """
function trigger_to_zipfile() {
document.querySelector("#zipfile").style.display = "flex";
document.querySelector("#trigger").style.display = "none";
}
"""
zipfile_to_offline_js = """
function zipfile_to_offline() {
document.querySelector("#zipfile").style.display = "none";
document.querySelector("#offline").style.display = "flex";
}
"""
trigger_to_offline_js = """
function trigger_to_offline() {
document.querySelector("#trigger").style.display = "none";
document.querySelector("#offline").style.display = "flex";
}
"""
offline_to_trigger_js = """
function offline_to_trigger() {
document.querySelector("#trigger").style.display = "flex";
document.querySelector("#offline").style.display = "none";
}
"""
offline_to_zipfile_js = """
function offline_to_zipfile() {
document.querySelector("#zipfile").style.display = "flex";
document.querySelector("#offline").style.display = "none";
}
"""