Spaces:
Sleeping
Sleeping
Upload app.py
Browse files- src/app.py +5 -0
src/app.py
CHANGED
|
@@ -589,6 +589,8 @@ def pyvis_from_kg(nodes_df, edges_df, height="780px"):
|
|
| 589 |
st.title("CitationHub")
|
| 590 |
st.caption("Explore influential papers (top 5% cited), their citation networks, and knowledge graphs.")
|
| 591 |
|
|
|
|
|
|
|
| 592 |
with st.sidebar:
|
| 593 |
st.subheader("Data source")
|
| 594 |
if HF_REPO_ID:
|
|
@@ -598,9 +600,12 @@ with st.sidebar:
|
|
| 598 |
data_dir_val = st.text_input("Parquet directory", str(DEFAULT_DATA_DIR))
|
| 599 |
|
| 600 |
try:
|
|
|
|
| 601 |
seed, events, citing, filters, overview = load_data(data_dir_val)
|
|
|
|
| 602 |
st.success("Data loaded")
|
| 603 |
except Exception as e:
|
|
|
|
| 604 |
st.error(str(e)); st.stop()
|
| 605 |
|
| 606 |
st.subheader("Search seed papers")
|
|
|
|
| 589 |
st.title("CitationHub")
|
| 590 |
st.caption("Explore influential papers (top 5% cited), their citation networks, and knowledge graphs.")
|
| 591 |
|
| 592 |
+
_loading_placeholder = st.empty()
|
| 593 |
+
|
| 594 |
with st.sidebar:
|
| 595 |
st.subheader("Data source")
|
| 596 |
if HF_REPO_ID:
|
|
|
|
| 600 |
data_dir_val = st.text_input("Parquet directory", str(DEFAULT_DATA_DIR))
|
| 601 |
|
| 602 |
try:
|
| 603 |
+
_loading_placeholder.info("⏳ Loading CitationHub data… this may take a moment on first visit.")
|
| 604 |
seed, events, citing, filters, overview = load_data(data_dir_val)
|
| 605 |
+
_loading_placeholder.empty()
|
| 606 |
st.success("Data loaded")
|
| 607 |
except Exception as e:
|
| 608 |
+
_loading_placeholder.empty()
|
| 609 |
st.error(str(e)); st.stop()
|
| 610 |
|
| 611 |
st.subheader("Search seed papers")
|