Spaces:
Running
Running
Update dashboard.py
Browse files- dashboard.py +8 -3
dashboard.py
CHANGED
@@ -194,8 +194,9 @@ with gr.Blocks(theme=gr.themes.Soft(), title="VerifiAI - Deepfake Detector") as
|
|
194 |
return False, gr.update(value="β Invalid email or password.", visible=True)
|
195 |
|
196 |
def handle_logout():
|
197 |
-
|
198 |
-
|
|
|
199 |
def handle_signup(name, phone, email, gender, password):
|
200 |
msg = register_user(name, phone, email, gender, password)
|
201 |
if msg.startswith("β
"):
|
@@ -204,7 +205,11 @@ with gr.Blocks(theme=gr.themes.Soft(), title="VerifiAI - Deepfake Detector") as
|
|
204 |
return gr.update(value=msg, visible=True), name, phone, email, gender, password, gr.update(open=True)
|
205 |
|
206 |
login_btn.click(fn=handle_login, inputs=[email_login, password_login], outputs=[is_logged_in, message_output])
|
207 |
-
logout_btn.click(
|
|
|
|
|
|
|
|
|
208 |
|
209 |
# --- FIX 3: Add the `tabs` component to the outputs of the change event ---
|
210 |
is_logged_in.change(
|
|
|
194 |
return False, gr.update(value="β Invalid email or password.", visible=True)
|
195 |
|
196 |
def handle_logout():
|
197 |
+
# Return values for: is_logged_in, email_login, password_login, image_input, result
|
198 |
+
return False, "", "", None, ""
|
199 |
+
|
200 |
def handle_signup(name, phone, email, gender, password):
|
201 |
msg = register_user(name, phone, email, gender, password)
|
202 |
if msg.startswith("β
"):
|
|
|
205 |
return gr.update(value=msg, visible=True), name, phone, email, gender, password, gr.update(open=True)
|
206 |
|
207 |
login_btn.click(fn=handle_login, inputs=[email_login, password_login], outputs=[is_logged_in, message_output])
|
208 |
+
logout_btn.click(
|
209 |
+
fn=handle_logout,
|
210 |
+
inputs=[],
|
211 |
+
outputs=[is_logged_in, email_login, password_login, image_input, result]
|
212 |
+
)
|
213 |
|
214 |
# --- FIX 3: Add the `tabs` component to the outputs of the change event ---
|
215 |
is_logged_in.change(
|