Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
micaelakaplan committed Feb 21, 2025
1 parent d6fe4d4 commit 2ac50db
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions label_studio_ml/examples/gliner/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ def test_predict(client):
}

expected_response = {"results": [{"model_version": "GLiNERModel-v0.0.1", "result": [
{"from_name": "label", "score": 0.8706, "to_name": "text", "type": "labels",
{"from_name": "label", "score": 0.922, "to_name": "text", "type": "labels",
"value": {"end": 11, "labels": ["Medication/Vaccine"], "start": 0, "text": "atomoxetine"}},
{"from_name": "label", "score": 0.8706, "to_name": "text", "type": "labels",
"value": {"end": 65, "labels": ["Medication/Vaccine"], "start": 32,
"text": "norepinephrine reuptake inhibitor"}}], "score": 0.8706}]}
"text": "norepinephrine reuptake inhibitor"}}], "score": 0.7053}]}

response = client.post('/predict', data=json.dumps(request), content_type='application/json')
assert response.status_code == 200
Expand Down

0 comments on commit 2ac50db

Please sign in to comment.