LukeFP's picture
readme
23615dd
metadata
title: Physics Topic Labeling
emoji: 🏢
colorFrom: pink
colorTo: yellow
sdk: gradio
sdk_version: 6.6.0
app_file: app.py
pinned: false

PhySH Taxonomy Classifier — Gradio App

Interactive web app that predicts APS PhySH disciplines and research-area concepts for a given paper title + abstract.

How it works

  1. Text is embedded with google/embeddinggemma-300m (768-dim, L2-normalised).
  2. Stage 1 — A multi-label MLP predicts discipline probabilities (18 classes).
  3. Stage 2 — A discipline-conditioned MLP concatenates the embedding with discipline probabilities and predicts research-area concepts (186 classes).

Both models are .pt checkpoints trained in ../0120_taxonomy_training_inference/.

Setup

The app uses the project-level virtualenv (.venv at the repo root).

# From the repo root
source .venv/bin/activate

# Install the one extra dependency
pip install gradio

Run

cd 0219_gradio
python app.py

Then open http://127.0.0.1:7860 in your browser.

Model files

The app expects these checkpoints in the same directory as app.py:

  • discipline_classifier_gemma_20260130_140842.pt
  • concept_conditioned_gemma_20260130_140842.pt