Stop the index provenance from stalling the first Database visit
#14
by lvwerra HF Staff - opened
app.py
CHANGED
|
@@ -220,7 +220,11 @@ def build_app(catalog=None):
|
|
| 220 |
+ (f"Annotations load on demand from {catalog.manifest.get('source_count', len(catalog.manifest['sources']))} bucket files. "
|
| 221 |
f"Index updated {catalog.manifest['created_at'][:10]}." if remote_mode else "Offline sample."), elem_classes="quiet-note")
|
| 222 |
gr.Dataframe(value=display_table(all_ids), interactive=False, show_label=False)
|
| 223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 224 |
|
| 225 |
found = [status, results, hits, selected, file]
|
| 226 |
shown = [metadata, start, end, plot, note, file]
|
|
|
|
| 220 |
+ (f"Annotations load on demand from {catalog.manifest.get('source_count', len(catalog.manifest['sources']))} bucket files. "
|
| 221 |
f"Index updated {catalog.manifest['created_at'][:10]}." if remote_mode else "Offline sample."), elem_classes="quiet-note")
|
| 222 |
gr.Dataframe(value=display_table(all_ids), interactive=False, show_label=False)
|
| 223 |
+
# The manifest lists every indexed assembly, 33,722 of them. Rendered
|
| 224 |
+
# as a JSON tree that is ~200k DOM nodes, which Gradio builds on the
|
| 225 |
+
# first visit to this tab: a 3.8 s stall. The count says the same.
|
| 226 |
+
gr.JSON(value={k: len(v) if k == "assemblies" else v for k, v in catalog.manifest.items()},
|
| 227 |
+
label="Index provenance" if remote_mode else "Sample provenance")
|
| 228 |
|
| 229 |
found = [status, results, hits, selected, file]
|
| 230 |
shown = [metadata, start, end, plot, note, file]
|