Rebuild graph when it's out of time. (#4607)

### What problem does this PR solve?

#4543

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
- [x] Refactoring
This commit is contained in:
Kevin Hu
2025-01-23 17:26:20 +08:00
committed by GitHub
parent bbc1d02c96
commit 86892959a0
5 changed files with 55 additions and 10 deletions

View File

@ -251,11 +251,11 @@ class KGSearch(Dealer):
break
if ents:
ents = "\n-Entities-\n{}".format(pd.DataFrame(ents).to_csv())
ents = "\n---- Entities ----\n{}".format(pd.DataFrame(ents).to_csv())
else:
ents = ""
if relas:
relas = "\n-Relations-\n{}".format(pd.DataFrame(relas).to_csv())
relas = "\n---- Relations ----\n{}".format(pd.DataFrame(relas).to_csv())
else:
relas = ""
@ -296,7 +296,7 @@ class KGSearch(Dealer):
if not txts:
return ""
return "\n-Community Report-\n" + "\n".join(txts)
return "\n---- Community Report ----\n" + "\n".join(txts)
if __name__ == "__main__":