Team Ai
Apppublic

LukeFP/physh_topic_classification

sourceHugging Faceupdated 8mo agoView on Hugging Face
1likes
App README

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. 1.Text is embedded with google/embeddinggemma-300m (768-dim, L2-normalised).
  2. 2.Stage 1 — A multi-label MLP predicts discipline probabilities (18 classes).
  3. 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).

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

# Install the one extra dependency
pip install gradio

Run

bash
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