Spaces:
Sleeping
Sleeping
jovian
commited on
Commit
·
930d12a
1
Parent(s):
9a09e4e
login
Browse files
app.py
CHANGED
|
@@ -232,17 +232,7 @@ def generate_graphs_btn(annotations):
|
|
| 232 |
return individual_graphs
|
| 233 |
|
| 234 |
|
| 235 |
-
js_func = """
|
| 236 |
-
function refresh() {
|
| 237 |
-
const url = new URL(window.location);
|
| 238 |
|
| 239 |
-
if (url.searchParams.get('__theme') !== 'light') {
|
| 240 |
-
url.searchParams.set('__theme', 'light');
|
| 241 |
-
window.location.href = url.href;
|
| 242 |
-
}
|
| 243 |
-
}
|
| 244 |
-
|
| 245 |
-
"""
|
| 246 |
|
| 247 |
|
| 248 |
# Function to handle login authentication
|
|
@@ -254,7 +244,7 @@ def login_auth(username, password):
|
|
| 254 |
|
| 255 |
|
| 256 |
# Gradio interface components
|
| 257 |
-
with gr.Blocks(
|
| 258 |
|
| 259 |
# State variable to track login status
|
| 260 |
login_successful = gr.State(value=False)
|
|
@@ -459,11 +449,7 @@ with gr.Blocks(js=js_func) as demo:
|
|
| 459 |
|
| 460 |
with gr.Column(scale=2):
|
| 461 |
gr.Markdown("")
|
| 462 |
-
|
| 463 |
-
with gr.Row():
|
| 464 |
-
with gr.Column(scale=4):
|
| 465 |
-
gr.HTML('<center><i>© 2024 OIS AI Defect Detection Model</center>')
|
| 466 |
-
|
| 467 |
|
| 468 |
|
| 469 |
# Launch the Gradio interface
|
|
|
|
| 232 |
return individual_graphs
|
| 233 |
|
| 234 |
|
|
|
|
|
|
|
|
|
|
| 235 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 236 |
|
| 237 |
|
| 238 |
# Function to handle login authentication
|
|
|
|
| 244 |
|
| 245 |
|
| 246 |
# Gradio interface components
|
| 247 |
+
with gr.Blocks() as demo:
|
| 248 |
|
| 249 |
# State variable to track login status
|
| 250 |
login_successful = gr.State(value=False)
|
|
|
|
| 449 |
|
| 450 |
with gr.Column(scale=2):
|
| 451 |
gr.Markdown("")
|
| 452 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
| 453 |
|
| 454 |
|
| 455 |
# Launch the Gradio interface
|