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 files
This view is limited to 50 files because it contains too many changes. Β  See raw diff
Files changed (50) hide show
  1. README.md +1 -1
  2. hf-repo/hf-repo/README.md +43 -0
  3. hf-repo/hf-repo/app.py +5 -4
  4. hf-repo/hf-repo/graphgen/{__init__.py β†’ graphgen/__init__.py} +0 -0
  5. hf-repo/hf-repo/graphgen/{configs β†’ graphgen/configs}/README.md +0 -0
  6. hf-repo/hf-repo/graphgen/{configs β†’ graphgen/configs}/aggregated_config.yaml +0 -0
  7. hf-repo/hf-repo/graphgen/{configs β†’ graphgen/configs}/atomic_config.yaml +0 -0
  8. hf-repo/hf-repo/graphgen/{configs β†’ graphgen/configs}/cot_config.yaml +0 -0
  9. hf-repo/hf-repo/graphgen/{configs β†’ graphgen/configs}/multi_hop_config.yaml +0 -0
  10. hf-repo/hf-repo/graphgen/{evaluate.py β†’ graphgen/evaluate.py} +0 -0
  11. hf-repo/hf-repo/graphgen/{generate.py β†’ graphgen/generate.py} +0 -0
  12. hf-repo/hf-repo/graphgen/{graphgen.py β†’ graphgen/graphgen.py} +0 -0
  13. hf-repo/hf-repo/graphgen/{judge.py β†’ graphgen/judge.py} +0 -0
  14. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/__init__.py +0 -0
  15. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/community/__init__.py +0 -0
  16. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/community/community_detector.py +0 -0
  17. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/embed/__init__.py +0 -0
  18. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/embed/embedding.py +0 -0
  19. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/evaluate/__init__.py +0 -0
  20. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/evaluate/base_evaluator.py +0 -0
  21. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/evaluate/length_evaluator.py +0 -0
  22. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/evaluate/mtld_evaluator.py +0 -0
  23. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/evaluate/reward_evaluator.py +0 -0
  24. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/evaluate/uni_evaluator.py +0 -0
  25. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/llm/__init__.py +0 -0
  26. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/llm/limitter.py +0 -0
  27. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/llm/openai_model.py +0 -0
  28. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/llm/tokenizer.py +0 -0
  29. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/llm/topk_token_model.py +0 -0
  30. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/search/__init__.py +0 -0
  31. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/search/db/__init__.py +0 -0
  32. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/search/db/uniprot_search.py +0 -0
  33. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/search/kg/__init__.py +0 -0
  34. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/search/kg/wiki_search.py +0 -0
  35. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/search/web/__init__.py +0 -0
  36. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/search/web/bing_search.py +0 -0
  37. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/search/web/google_search.py +0 -0
  38. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/storage/__init__.py +0 -0
  39. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/storage/base_storage.py +0 -0
  40. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/storage/json_storage.py +0 -0
  41. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/storage/networkx_storage.py +0 -0
  42. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/strategy/__init__.py +0 -0
  43. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/strategy/base_strategy.py +0 -0
  44. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/strategy/travserse_strategy.py +0 -0
  45. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/text/__init__.py +0 -0
  46. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/text/chunk.py +0 -0
  47. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/text/text_pair.py +0 -0
  48. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/vis/__init__.py +0 -0
  49. hf-repo/hf-repo/graphgen/{models β†’ graphgen/models}/vis/community_visualizer.py +0 -0
  50. 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: webui/app.py
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
- from test_api import test_api_connection
 
 
 
 
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