denisabirisanophelia2000/Bottom-Up-Construction-of-a-Temporal-Knowledge-Graph-from-Romanian-Diplomatic-News
1
Live demo — temporal knowledge graph from Romanian/Chinese diplomatic news
Fetch one embassy article, extract it live through one of two pipelines (full-LLM, schema-constrained · DeepKE-hybrid, open-schema), build the graph in an embedded Neo4j alongside the cached corpus, enrich it, and answer the 33 competency questions. A "use cached result" switch bypasses the GPU for a safe fallback.
Hardware
Set the Space hardware to a GPU (A10G small recommended) in Settings → Hardware. The models are loaded in 4-bit and stay warm, so the first run pays the load cost and later runs are fast (~30–60 s full-LLM, ~2 min DeepKE).
Secrets / variables (Settings → Variables and secrets)
NEO4J_PASS(secret) — password for the embedded Neo4j (any value).
Assets you must add to the repo (not committed here)
models/romanian-ner-model/— your fine-tuned Romanian-BERT NER weights (or setNER_DIRto a HF Hub id). Needed only for the RO DeepKE pipeline.corpus/deepke_ro/*.json,corpus/fullllm_ro/*.json— the cached 35 RO extractions.corpus/deepke_zh/*.json,corpus/fullllm_zh/*.json— the cached 3 ZH extractions.demo-results/cq_report_*.md— pre-generated reports for the cached-result fallback.
Large files (models/) should be tracked with git LFS. RoGemma2/Qwen weights are downloaded from the Hub at runtime (not bundled).
Files
app.py— Gradio UI + orchestration + embedded-Neo4j connection.pipeline.py— the extraction/graph/CQ logic, ported from the thesis demo notebook.Dockerfile/start.sh— CUDA + Neo4j (with APOC) + the app.
