Spaces:
Sleeping
Sleeping
Delete README.md
Browse files
README.md
DELETED
@@ -1,73 +0,0 @@
|
|
1 |
-
---
|
2 |
-
title: SigmaTriple
|
3 |
-
emoji: 🔍
|
4 |
-
colorFrom: blue
|
5 |
-
colorTo: indigo
|
6 |
-
sdk: streamlit
|
7 |
-
sdk_version: "1.32.0"
|
8 |
-
app_file: app.py
|
9 |
-
pinned: false
|
10 |
-
---
|
11 |
-
|
12 |
-
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
13 |
-
|
14 |
-
# SigmaTriple: Knowledge Graph Extraction from Markdown
|
15 |
-
|
16 |
-
This Hugging Face Space provides a Streamlit interface for extracting knowledge graphs from markdown text using the [SciPhi/Triplex](https://huggingface.co/sciphi/triplex) model.
|
17 |
-
|
18 |
-
## Features
|
19 |
-
|
20 |
-
- **Extract Knowledge Graphs**: Automatically identify entities and relationships from markdown text
|
21 |
-
- **Customizable Entity Types and Predicates**: Define the types of entities and relationships you want to extract
|
22 |
-
- **Batch Processing**: Process large markdown files efficiently using vllm
|
23 |
-
- **Interactive Visualization**: View the extracted knowledge graph as an interactive network diagram
|
24 |
-
- **File Upload Support**: Upload markdown files directly or input text manually
|
25 |
-
|
26 |
-
## How It Works
|
27 |
-
|
28 |
-
1. The application uses the SciPhi/Triplex model, which is fine-tuned for knowledge graph extraction
|
29 |
-
2. Markdown text is processed to extract plain text content
|
30 |
-
3. For large texts, batch processing is applied with overlapping chunks to ensure context is maintained
|
31 |
-
4. The model identifies entities and relationships based on the specified entity types and predicates
|
32 |
-
5. Results are parsed and visualized as an interactive knowledge graph
|
33 |
-
|
34 |
-
## Usage
|
35 |
-
|
36 |
-
1. **Configure Entity Types and Predicates**:
|
37 |
-
- In the sidebar, customize the entity types (e.g., PERSON, ORGANIZATION) and predicates (e.g., WORKS_AT, FOUNDED) you want to extract
|
38 |
-
|
39 |
-
2. **Input Text**:
|
40 |
-
- Choose between direct text input or file upload
|
41 |
-
- For text input, simply paste your markdown text in the provided area
|
42 |
-
- For file upload, select a markdown (.md), markdown (.markdown), or text (.txt) file
|
43 |
-
|
44 |
-
3. **Extract Knowledge Graph**:
|
45 |
-
- Click the "Extract Knowledge Graph" button to process the text
|
46 |
-
- View the raw model output, extracted triplets table, and interactive visualization
|
47 |
-
|
48 |
-
## Technical Details
|
49 |
-
|
50 |
-
- Uses the SciPhi/Triplex model for knowledge graph extraction
|
51 |
-
- Implements vllm for efficient batch processing when available
|
52 |
-
- Falls back to standard transformers library if vllm is not available
|
53 |
-
- Visualizes knowledge graphs using NetworkX and PyVis
|
54 |
-
|
55 |
-
## Example Use Cases
|
56 |
-
|
57 |
-
- **Research Papers**: Extract key concepts and relationships from academic papers
|
58 |
-
- **Documentation**: Create knowledge graphs from technical documentation
|
59 |
-
- **Content Analysis**: Identify key entities and relationships in articles or blog posts
|
60 |
-
- **Educational Content**: Visualize relationships between concepts in educational materials
|
61 |
-
|
62 |
-
## Limitations
|
63 |
-
|
64 |
-
- The quality of extraction depends on the clarity and structure of the input text
|
65 |
-
- Very large documents may require significant processing time
|
66 |
-
- The model may not capture all relationships, especially those requiring deep contextual understanding
|
67 |
-
|
68 |
-
## Credits
|
69 |
-
|
70 |
-
- [SciPhi/Triplex Model](https://huggingface.co/sciphi/triplex)
|
71 |
-
- [vllm](https://github.com/vllm-project/vllm) for efficient batch processing
|
72 |
-
- [Streamlit](https://streamlit.io/) for the web interface
|
73 |
-
- [NetworkX](https://networkx.org/) and [PyVis](https://pyvis.readthedocs.io/) for graph visualization
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|