Directions to use KGE | DSG
Last updated
Last updated
The usable apps are:
Text-Knowledge Graph Generation.
Image-Knowledge Graph Generation
Text & Image Vector Embedding & Knowledge Graph Embedding with TensorBoard
The guide on using the Text-Based Knowledge Graph Visualization App! The app is built using Flask, Python libraries, and the REBEL model, it efficiently extracts knowledge from text and visualizes it as interactive graphs. Let's dive into how you can make the most of this tool.
Prerequisites
Before you begin, make sure your environment is ready:
Python 3.7 or higher
pip (Python package installer)
Graphviz for advanced graph visualization
Installation Steps
Clone the Repository: Fork the project repository and clone it to your local machine:
Set Up a Virtual Environment: Activate a virtual environment to manage dependencies:
On Windows:
On macOS/Linux:
Install Dependencies: Install the required Python packages:
Install Graphviz: Ensure Graphviz is installed and added to your system path:
Windows: Download from the Graphviz website.
macOS/Linux: Use Homebrew or your package manager:
Once installed, follow these steps to run the app:
Activate Virtual Environment and set the Flask app environment variable:
On Windows:
On macOS/Linux:
Start the Flask Server:
Access the App: Open http://127.0.0.1:5000/
in your browser to start using the app.
Input Text: Paste the text you want to analyze on the homepage.
Generate the Knowledge Graph: Click "Generate Knowledge Graph" to process the text and generate visualizations.
View the Results: Explore the generated knowledge graph on the result page.
Text Processing: The app extracts triplets (subject-predicate-object) from the text using the REBEL model.
Graph Construction: These triplets are used to build a knowledge graph with NetworkX.
Visualization: The graph can be visualized in several ways:
Static Graph: Created with Matplotlib and NetworkX.
Interactive Graph: Built using Plotly, offering dynamic exploration.
Hierarchical Layout: Structured using Graphviz.
Having trouble? Here are some quick fixes:
Python Compatibility: Ensure you're using Python 3.7+.
Virtual Environment: Verify your virtual environment is active.
Graphviz Installation: Make sure Graphviz is installed correctly and added to your PATH.
Memory Issues: For large texts, consider using a machine with more RAM.