Spaces:
Sleeping
Sleeping
File size: 472 Bytes
220c33b 482f5aa 220c33b |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
import requests
API_URL = "https://api-inference.huggingface.co/models/facebook/blenderbot-400M-distill"
headers = {"Authorization": "Bearer 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"}
def query(payload):
response = requests.post(API_URL, headers=headers, json=payload)
return response.json()
output = query({
"inputs": {
"past_user_inputs": ["Which movie is the best ?"],
"generated_responses": ["It's Die Hard for sure."],
"text": "Can you explain why ?"
},
}) |