Spaces:
Runtime error
Runtime error
github-actions[bot]
commited on
Commit
Β·
f1d3933
1
Parent(s):
4041dfe
Auto-sync from demo at Thu Aug 28 09:57:48 UTC 2025
Browse filesThis view is limited to 50 files because it contains too many changes. Β
See raw diff
- README.md +1 -1
- hf-repo/hf-repo/README.md +43 -0
- hf-repo/hf-repo/app.py +5 -4
- hf-repo/hf-repo/graphgen/{__init__.py β graphgen/__init__.py} +0 -0
- hf-repo/hf-repo/graphgen/{configs β graphgen/configs}/README.md +0 -0
- hf-repo/hf-repo/graphgen/{configs β graphgen/configs}/aggregated_config.yaml +0 -0
- hf-repo/hf-repo/graphgen/{configs β graphgen/configs}/atomic_config.yaml +0 -0
- hf-repo/hf-repo/graphgen/{configs β graphgen/configs}/cot_config.yaml +0 -0
- hf-repo/hf-repo/graphgen/{configs β graphgen/configs}/multi_hop_config.yaml +0 -0
- hf-repo/hf-repo/graphgen/{evaluate.py β graphgen/evaluate.py} +0 -0
- hf-repo/hf-repo/graphgen/{generate.py β graphgen/generate.py} +0 -0
- hf-repo/hf-repo/graphgen/{graphgen.py β graphgen/graphgen.py} +0 -0
- hf-repo/hf-repo/graphgen/{judge.py β graphgen/judge.py} +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/__init__.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/community/__init__.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/community/community_detector.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/embed/__init__.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/embed/embedding.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/evaluate/__init__.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/evaluate/base_evaluator.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/evaluate/length_evaluator.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/evaluate/mtld_evaluator.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/evaluate/reward_evaluator.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/evaluate/uni_evaluator.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/llm/__init__.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/llm/limitter.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/llm/openai_model.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/llm/tokenizer.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/llm/topk_token_model.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/search/__init__.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/search/db/__init__.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/search/db/uniprot_search.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/search/kg/__init__.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/search/kg/wiki_search.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/search/web/__init__.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/search/web/bing_search.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/search/web/google_search.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/storage/__init__.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/storage/base_storage.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/storage/json_storage.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/storage/networkx_storage.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/strategy/__init__.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/strategy/base_strategy.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/strategy/travserse_strategy.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/text/__init__.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/text/chunk.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/text/text_pair.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/vis/__init__.py +0 -0
- hf-repo/hf-repo/graphgen/{models β graphgen/models}/vis/community_visualizer.py +0 -0
- hf-repo/hf-repo/graphgen/{operators β graphgen/operators}/__init__.py +0 -0
README.md
CHANGED
@@ -6,7 +6,7 @@ colorTo: green
|
|
6 |
sdk: gradio
|
7 |
sdk_version: "5.44.0"
|
8 |
python_version: "3.10"
|
9 |
-
app_file:
|
10 |
suggested_hardware: cpu-basic
|
11 |
pinned: false
|
12 |
short_description: "Knowledge-driven synthetic data generation demo"
|
|
|
6 |
sdk: gradio
|
7 |
sdk_version: "5.44.0"
|
8 |
python_version: "3.10"
|
9 |
+
app_file: app.py
|
10 |
suggested_hardware: cpu-basic
|
11 |
pinned: false
|
12 |
short_description: "Knowledge-driven synthetic data generation demo"
|
hf-repo/hf-repo/README.md
ADDED
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
title: GraphGen Demo
|
3 |
+
emoji: π
|
4 |
+
colorFrom: blue
|
5 |
+
colorTo: green
|
6 |
+
sdk: gradio
|
7 |
+
sdk_version: "5.44.0"
|
8 |
+
python_version: "3.10"
|
9 |
+
app_file: webui/app.py
|
10 |
+
suggested_hardware: cpu-basic
|
11 |
+
pinned: false
|
12 |
+
short_description: "Knowledge-driven synthetic data generation demo"
|
13 |
+
tags:
|
14 |
+
- synthetic-data
|
15 |
+
- knowledge-graph
|
16 |
+
- gradio-demo
|
17 |
+
---
|
18 |
+
|
19 |
+
# GraphGen Space π€π
|
20 |
+
|
21 |
+
This is the **official Hugging Face Space** for [GraphGen](https://github.com/open-sciencelab/GraphGen) β a framework that leverages knowledge graphs to generate high-quality synthetic questionβanswer pairs for supervised fine-tuning of LLMs.
|
22 |
+
|
23 |
+
π Paper: [arXiv 2505.20416](https://arxiv.org/abs/2505.20416)
|
24 |
+
π GitHub: [open-sciencelab/GraphGen](https://github.com/open-sciencelab/GraphGen)
|
25 |
+
|
26 |
+
---
|
27 |
+
|
28 |
+
## How to use (π±οΈ 3 clicks)
|
29 |
+
|
30 |
+
1. Open the **Gradio app** above.
|
31 |
+
2. Upload or paste your source text β click **Generate KG**.
|
32 |
+
3. Download the generated QA pairs directly.
|
33 |
+
|
34 |
+
---
|
35 |
+
|
36 |
+
## Local quick start (optional)
|
37 |
+
|
38 |
+
```bash
|
39 |
+
git clone https://github.com/open-sciencelab/GraphGen
|
40 |
+
cd GraphGen
|
41 |
+
uv venv --python 3.10 && uv pip install -r requirements.txt
|
42 |
+
uv run webui/app.py # http://localhost:7860
|
43 |
+
```
|
hf-repo/hf-repo/app.py
CHANGED
@@ -5,12 +5,13 @@ import tempfile
|
|
5 |
|
6 |
import gradio as gr
|
7 |
import pandas as pd
|
8 |
-
from base import GraphGenParams
|
9 |
-
from cache_utils import cleanup_workspace, setup_workspace
|
10 |
-
from count_tokens import count_tokens
|
11 |
from gradio_i18n import Translate
|
12 |
from gradio_i18n import gettext as _
|
13 |
-
|
|
|
|
|
|
|
|
|
14 |
|
15 |
# pylint: disable=wrong-import-position
|
16 |
root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
|
|
5 |
|
6 |
import gradio as gr
|
7 |
import pandas as pd
|
|
|
|
|
|
|
8 |
from gradio_i18n import Translate
|
9 |
from gradio_i18n import gettext as _
|
10 |
+
|
11 |
+
from webui.base import GraphGenParams
|
12 |
+
from webui.cache_utils import cleanup_workspace, setup_workspace
|
13 |
+
from webui.count_tokens import count_tokens
|
14 |
+
from webui.test_api import test_api_connection
|
15 |
|
16 |
# pylint: disable=wrong-import-position
|
17 |
root_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
|
hf-repo/hf-repo/graphgen/{__init__.py β graphgen/__init__.py}
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{configs β graphgen/configs}/README.md
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{configs β graphgen/configs}/aggregated_config.yaml
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{configs β graphgen/configs}/atomic_config.yaml
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{configs β graphgen/configs}/cot_config.yaml
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{configs β graphgen/configs}/multi_hop_config.yaml
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{evaluate.py β graphgen/evaluate.py}
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{generate.py β graphgen/generate.py}
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{graphgen.py β graphgen/graphgen.py}
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{judge.py β graphgen/judge.py}
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/__init__.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/community/__init__.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/community/community_detector.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/embed/__init__.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/embed/embedding.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/evaluate/__init__.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/evaluate/base_evaluator.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/evaluate/length_evaluator.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/evaluate/mtld_evaluator.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/evaluate/reward_evaluator.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/evaluate/uni_evaluator.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/llm/__init__.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/llm/limitter.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/llm/openai_model.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/llm/tokenizer.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/llm/topk_token_model.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/search/__init__.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/search/db/__init__.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/search/db/uniprot_search.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/search/kg/__init__.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/search/kg/wiki_search.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/search/web/__init__.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/search/web/bing_search.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/search/web/google_search.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/storage/__init__.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/storage/base_storage.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/storage/json_storage.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/storage/networkx_storage.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/strategy/__init__.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/strategy/base_strategy.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/strategy/travserse_strategy.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/text/__init__.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/text/chunk.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/text/text_pair.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/vis/__init__.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{models β graphgen/models}/vis/community_visualizer.py
RENAMED
File without changes
|
hf-repo/hf-repo/graphgen/{operators β graphgen/operators}/__init__.py
RENAMED
File without changes
|