File size: 747 Bytes
ea72792
4de97c3
 
ea72792
4de97c3
ea72792
4de97c3
ea72792
 
4de97c3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
---
title: SPECTER2 Embedding API
emoji: 📚
colorFrom: blue
colorTo: purple
sdk: docker
app_port: 7860
---

# SPECTER2 Embedding API

Academic paper embeddings using SPECTER2 with proximity adapter.

## Model Details

- **Model**: `allenai/specter2_base` + `allenai/specter2` (proximity adapter)
- **Dimensions**: 768
- **Best for**: Similarity search, retrieval, paper recommendation

## API Endpoints

### `GET /`
Health check - returns model info

### `POST /embed`
Single text embedding

```json
{"text": "Your paper title and abstract"}
```

### `POST /batch_embed`
Batch embeddings (max 100)

```json
{"texts": ["Paper 1...", "Paper 2..."]}
```

## Response Format

```json
{
  "embedding": [0.123, -0.456, ...],
  "dimensions": 768
}
```