Spaces:
Sleeping
Sleeping
restructure
Browse files- 0219_gradio/README.md +0 -41
- 0219_gradio/__pycache__/app.cpython-313.pyc +0 -0
- README.md +41 -12
- 0219_gradio/app.py β app.py +0 -0
- 0219_gradio/concept_conditioned_gemma_20260130_140842.pt β concept_conditioned_gemma_20260130_140842.pt +0 -0
- 0219_gradio/discipline_classifier_gemma_20260130_140842.pt β discipline_classifier_gemma_20260130_140842.pt +0 -0
- 0219_gradio/requirements.txt β requirements.txt +0 -0
0219_gradio/README.md
DELETED
|
@@ -1,41 +0,0 @@
|
|
| 1 |
-
# PhySH Taxonomy Classifier β Gradio App
|
| 2 |
-
|
| 3 |
-
Interactive web app that predicts APS PhySH **disciplines** and **research-area concepts**
|
| 4 |
-
for a given paper title + abstract.
|
| 5 |
-
|
| 6 |
-
## How it works
|
| 7 |
-
|
| 8 |
-
1. Text is embedded with `google/embeddinggemma-300m` (768-dim, L2-normalised).
|
| 9 |
-
2. **Stage 1** β A multi-label MLP predicts discipline probabilities (18 classes).
|
| 10 |
-
3. **Stage 2** β A discipline-conditioned MLP concatenates the embedding with discipline
|
| 11 |
-
probabilities and predicts research-area concepts (186 classes).
|
| 12 |
-
|
| 13 |
-
Both models are `.pt` checkpoints trained in `../0120_taxonomy_training_inference/`.
|
| 14 |
-
|
| 15 |
-
## Setup
|
| 16 |
-
|
| 17 |
-
The app uses the project-level virtualenv (`.venv` at the repo root).
|
| 18 |
-
|
| 19 |
-
```bash
|
| 20 |
-
# From the repo root
|
| 21 |
-
source .venv/bin/activate
|
| 22 |
-
|
| 23 |
-
# Install the one extra dependency
|
| 24 |
-
pip install gradio
|
| 25 |
-
```
|
| 26 |
-
|
| 27 |
-
## Run
|
| 28 |
-
|
| 29 |
-
```bash
|
| 30 |
-
cd 0219_gradio
|
| 31 |
-
python app.py
|
| 32 |
-
```
|
| 33 |
-
|
| 34 |
-
Then open `http://127.0.0.1:7860` in your browser.
|
| 35 |
-
|
| 36 |
-
## Model files
|
| 37 |
-
|
| 38 |
-
The app expects these checkpoints in the same directory as `app.py`:
|
| 39 |
-
|
| 40 |
-
- `discipline_classifier_gemma_20260130_140842.pt`
|
| 41 |
-
- `concept_conditioned_gemma_20260130_140842.pt`
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
0219_gradio/__pycache__/app.cpython-313.pyc
DELETED
|
Binary file (13.9 kB)
|
|
|
README.md
CHANGED
|
@@ -1,12 +1,41 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# PhySH Taxonomy Classifier β Gradio App
|
| 2 |
+
|
| 3 |
+
Interactive web app that predicts APS PhySH **disciplines** and **research-area concepts**
|
| 4 |
+
for a given paper title + abstract.
|
| 5 |
+
|
| 6 |
+
## How it works
|
| 7 |
+
|
| 8 |
+
1. Text is embedded with `google/embeddinggemma-300m` (768-dim, L2-normalised).
|
| 9 |
+
2. **Stage 1** β A multi-label MLP predicts discipline probabilities (18 classes).
|
| 10 |
+
3. **Stage 2** β A discipline-conditioned MLP concatenates the embedding with discipline
|
| 11 |
+
probabilities and predicts research-area concepts (186 classes).
|
| 12 |
+
|
| 13 |
+
Both models are `.pt` checkpoints trained in `../0120_taxonomy_training_inference/`.
|
| 14 |
+
|
| 15 |
+
## Setup
|
| 16 |
+
|
| 17 |
+
The app uses the project-level virtualenv (`.venv` at the repo root).
|
| 18 |
+
|
| 19 |
+
```bash
|
| 20 |
+
# From the repo root
|
| 21 |
+
source .venv/bin/activate
|
| 22 |
+
|
| 23 |
+
# Install the one extra dependency
|
| 24 |
+
pip install gradio
|
| 25 |
+
```
|
| 26 |
+
|
| 27 |
+
## Run
|
| 28 |
+
|
| 29 |
+
```bash
|
| 30 |
+
cd 0219_gradio
|
| 31 |
+
python app.py
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
Then open `http://127.0.0.1:7860` in your browser.
|
| 35 |
+
|
| 36 |
+
## Model files
|
| 37 |
+
|
| 38 |
+
The app expects these checkpoints in the same directory as `app.py`:
|
| 39 |
+
|
| 40 |
+
- `discipline_classifier_gemma_20260130_140842.pt`
|
| 41 |
+
- `concept_conditioned_gemma_20260130_140842.pt`
|
0219_gradio/app.py β app.py
RENAMED
|
File without changes
|
0219_gradio/concept_conditioned_gemma_20260130_140842.pt β concept_conditioned_gemma_20260130_140842.pt
RENAMED
|
File without changes
|
0219_gradio/discipline_classifier_gemma_20260130_140842.pt β discipline_classifier_gemma_20260130_140842.pt
RENAMED
|
File without changes
|
0219_gradio/requirements.txt β requirements.txt
RENAMED
|
File without changes
|