This Streamlit app provides an interactive user interface to visualize tables or graphs, and execute SPARQL queries. The app is designed with a simple, user-friendly layout to make it easier to interact with and explore data.
- Features
- Installation
- Usage
- Project Structure
- Requirements
- Running the WebVOWL Server
- Using OWL2VOWL
- Demo & Teaser Videos
- Contributing
- License
- Technologies Used
- Data visualization
- SPARQL query execution
- Chat interface aware of the current SPARQL query
- Integration with WebVOWL for visualizing ontologies
-
Clone this repository:
git clone https://github.com/group-f3-dsp/streamlit-sparql-ui.git cd streamlit-sparql-ui
-
Set up the virtual environment:
python -m venv .venv
-
Activate the virtual environment:
- On Windows:
.venv\Scripts\activate
- On macOS/Linux:
source .venv/bin/activate
- On Windows:
-
Install the required dependencies:
pip install -r requirements.txt
-
Set up your OpenAI API key and Gemini API key in the Streamlit secrets:
echo "[secrets]" > .streamlit/secrets.toml echo "OPENAI_API_KEY = 'your-openai-api-key'" >> .streamlit/secrets.toml echo "GEMINI_API_KEY = 'your-gemini-api-key'" >> .streamlit/secrets.toml
-
Run the Streamlit app:
streamlit run main.py
-
Open your browser and navigate to:
http://localhost:8501
streamlit-sparql-ui/
│
├── .streamlit/ # Streamlit configuration and secrets
├── secrets.toml
├── archive/ # Directory containing archive code
├── data/ # Directory containing ontology and example files
│ ├── example.owl
│ ├── example.json
│ ├── dbpedia_ontology.owl
│ ├── dbpedia_ontology.json
│ └── smallTest.md
├── main.py # Main Streamlit app code
├── README.md # Documentation for the app
├── requirements.txt # Python dependencies
└── sparql_utils.py # Utility functions for running SPARQL queries
└── chat_utils.py # Utility functions for the Gemini chat
└── config.py # Configuration file
- Node.js
-
Download and install Node.js from Node.js download page)
-
Clone the WebVOWL repository:
git clone https://github.com/VisualDataWeb/WebVOWL.git cd WebVOWL
-
Install dependencies and build the project:
npm install
-
Build the project:
npm run-script release
-
Install
serve
globally:npm install serve -g
-
Run the WebVOWL server locally:
serve deploy/
-
Access WebVOWL:
- Open your browser and visit http://localhost:3000 to use WebVOWL
With OWL2VOWL, you can convert an OWL file to JSON. Follow these steps to set up and use OWL2VOWL:
-
Build the Docker image:
docker build -t owl2vowl/owl2vowl .
-
Run the Docker container:
docker run --rm -d -p 8080:8080 owl2vowl/owl2vowl
-
Convert an OWL file to JSON:
-
First, get the timestamp:
curl -X GET http://localhost:8080/timestamp
-
Then, supply the OWL file and get the JSON back:
curl -X POST -F "file=@path/to/your/file.owl" http://localhost:8080/convert
Replace
path/to/your/file.owl
with the actual path to your OWL file. -
- Demo: Watch on YouTube
- Teaser Video: Watch on YouTube
Feel free to open issues or submit pull requests if you have any improvements or bug fixes.
This project is licensed under the GPL-3.0 license.