Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
metadata
title: IRIS at TEXT2SPARQL
sdk: docker
app_port: 7860
pinned: false
TEXT2SPARQL Challenge Workspace
This directory contains the Hugging Face Space for the challenge-facing evaluation backend. It now bundles a frozen copy of the production pipeline and starts local Virtuoso from a snapshot stored in the mounted HF bucket.
Quick Start
cd /home/alatipov/TEXT2SPARQL_Challenge
python3.12 -m venv text2sparql_challenge
source text2sparql_challenge/bin/activate
pip install -r requirements-dev.txt
python -m uvicorn service.app:app --host 0.0.0.0 --port 8000
Then test it:
curl "http://127.0.0.1:8000/text2sparql?dataset=https://text2sparql.aksw.org/2026/dbpedia/&question=Who%20directed%20Inception%3F"
Container Quick Start
This project also includes a Docker setup aligned with Hugging Face Docker Spaces.
cd /home/alatipov/TEXT2SPARQL_Challenge
systemctl --user start docker.service
cp .env.example .env
./scripts/docker_build.sh
./scripts/docker_up.sh
./scripts/docker_ps.sh
See container_cheatsheet.md for the explanation-oriented version.
Files
service/app.py: challenge API entrypointdeployment/hf_eval_backend/: frozen production backend config/appsrc/: bundled pipeline source snapshotscripts/hf_*.sh: bucket restore + Virtuoso + app startupregistration/CHALLENGERS.entry.yaml: registration snippetrun_local.sh: convenience launcherrequirements-dev.txt: local development dependencies, including the official challenge clientDockerfile/compose.yaml: containerized API deploymentcontainer_cheatsheet.md: noob-friendly container notes
Local Environment
This project uses a local virtual environment directory:
/home/alatipov/TEXT2SPARQL_Challenge/text2sparql_challenge
Activate it with:
cd /home/alatipov/TEXT2SPARQL_Challenge
source text2sparql_challenge/bin/activate
Hugging Face Space
HF runtime expectation:
- mounted bucket at
/data - built DB snapshot uploaded to
/data/dbpedia_snapshot/ OPENAI_API_KEYset as a Space secret