vector-endpoint / test.py
wjm55
Update README to reflect changes in embedding response handling and adjust example usage
2e11453
raw
history blame contribute delete
321 Bytes
import requests
import json
url = "https://placingholocaust-vector-endpoint.hf.space/vectorize"
headers = {
"accept": "application/json",
"Content-Type": "application/json"
}
data = {
"text": "This is a text"
}
response = requests.post(url, headers=headers, json=data)
result = response.json()
print(result)