Spaces:
Sleeping
Sleeping
Yueyao Zhang
commited on
Commit
Β·
0533248
1
Parent(s):
099b0b8
automatically trigger initialization
Browse files- tabs/initialize.py +4 -13
tabs/initialize.py
CHANGED
|
@@ -32,24 +32,15 @@ def create_initialize_tab(global_vars):
|
|
| 32 |
with gr.Tab("π Initialize System", id="init"):
|
| 33 |
gr.Markdown("""
|
| 34 |
### Step 1: Initialize the System
|
| 35 |
-
|
| 36 |
This may take a few moments on first run as models are downloaded.
|
| 37 |
""")
|
| 38 |
|
| 39 |
-
|
| 40 |
-
"π Initialize Systems",
|
| 41 |
-
variant="primary",
|
| 42 |
-
size="lg"
|
| 43 |
-
)
|
| 44 |
-
|
| 45 |
init_status = gr.Textbox(
|
| 46 |
label="Initialization Status",
|
| 47 |
interactive=False,
|
| 48 |
lines=8,
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
init_btn.click(
|
| 53 |
-
lambda: initialize_systems(global_vars),
|
| 54 |
-
outputs=init_status
|
| 55 |
)
|
|
|
|
| 32 |
with gr.Tab("π Initialize System", id="init"):
|
| 33 |
gr.Markdown("""
|
| 34 |
### Step 1: Initialize the System
|
| 35 |
+
The AI models and embedding systems are initialized automatically.
|
| 36 |
This may take a few moments on first run as models are downloaded.
|
| 37 |
""")
|
| 38 |
|
| 39 |
+
# Automatically initialize systems and show status
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
init_status = gr.Textbox(
|
| 41 |
label="Initialization Status",
|
| 42 |
interactive=False,
|
| 43 |
lines=8,
|
| 44 |
+
value=initialize_systems(global_vars), # Call on load
|
| 45 |
+
placeholder="Initializing systems..."
|
|
|
|
|
|
|
|
|
|
|
|
|
| 46 |
)
|