| title | Evaluate Specter Embeddings |
|---|---|
| emoji | 🐠 |
| colorFrom | indigo |
| colorTo | purple |
| sdk | gradio |
| sdk_version | 3.31.0 |
| app_file | app.py |
| pinned | false |
| license | openrail |
You can always use the following API https://model-apis.semanticscholar.org/specter/v1/invoke to evaluate the Semantic Scholar's Specter embedding vectors.
This repo additionally adds an abstract before evaluating the embeddings. The abstract is generated using HuggingChat. The LLM will introduce more information and backgrounds to improve the accuracy of relevance evaluation.
- The abstract generation function is provided as a free demo on this Huggingface Spaces.
- The function of finding top-k relevant papers is served as a simple solution for selecting references in the Auto-Draft project.
- Visit this Huggingface Spaces.
For using the API to get top-k relevant papers, the embedding vector should be obtained from Semantic Scholar Specter model. The input format is provided in papers.json. The usage example is provided in api_test.py.
- Import dependencies.
from gradio_client import Client
import json - Create the client and make the prediction.
paper_title = "<your paper's title here>"
embeddings = True
client = Client("https://shaocongma-evaluate-specter-embeddings.hf.space/")
result = client.predict(paper_title, # str in 'Title' Textbox component
embeddings, # bool in 'Include Embedding?' Checkbox component
api_name="/get_embeddings")- Load the output JSON file.
with open(result) as f:
result = json.load(f)
print(result)Openrail