Spaces:
Wesleyjan
/
Runtime error

ncm / post.py
mfilipak's picture
Exemplo de chamada do WS via post. Use python post.py
941ed08
raw
history blame
No virus
272 Bytes
import requests
url = "https://afrac-ncm-demo.hf.space/api/predict"
payload = {
"data": ["Coca-Cola PET 2l"]
}
headers = {
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
result = response.json()
print(result)