CoolFace
Apppublic

QGI-dev/q-prime-demo

sourceHugging Faceotherupdated 5mo agoView on Hugging Face
0likes
App README

Q-Prime Demo

Live playground for the QGI Q-Prime quantum-structured embedding model.

Paste two policy clauses, hit Compare, and the demo hits QGI's managed API to return:

  • —Relevance — which clause applies.
  • —Conflict (signed) — the interference signal $\mathrm{polarity}(a,b)\cdot\langle a\,|\,b\rangle$. Positive means reinforcement; negative means contradiction.
  • —Overlap — the same inner product without the polarity sign.
  • —Predicate extraction — condition components.
  • —Born-rule classifier — $\arg\max_c |\langle c\,|\,\psi\rangle|^2$ against a small default label set (you can edit the labels).

This Space calls the Q-Prime API and does not run any model locally. A valid QGI_API_KEY must be set as a Space Secret by QGI staff; community forks will see a waitlist page.

How it works

  1. 1.You type two clauses (and optionally a set of zero-shot labels).
  2. 2.The Space calls POST https://api.qgi.dev/v1/qprime/embed with tasks=[relevance,conflict,overlap,predicate,classify].
  3. 3.The returned signals are rendered as coloured signed-similarity meters.

Rate limits

Demo is rate-limited per browser session. For programmatic use, request an evaluation API key via the Request access button on the Q-Prime model card.

Run locally (QGI staff only)

bash
export QGI_API_KEY=sk-...           # evaluation or staff key
export QGI_API_URL=https://api.qgi.dev/v1/qprime/embed
pip install -r requirements.txt
python app.py

License

Demo code: MIT. Q-Prime model: QGI Commercial Model License v1.0.

Contact

contact@qgi.dev · qgi.dev