Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gumshoe hugging face backend #218

Open
mitchelljkotler opened this issue Apr 29, 2024 · 0 comments
Open

Gumshoe hugging face backend #218

mitchelljkotler opened this issue Apr 29, 2024 · 0 comments

Comments

@mitchelljkotler
Copy link
Member

mitchelljkotler commented Apr 29, 2024

Can we replace custom GCP backend with hugging face?

https://huggingface.co/facebook/bart-large-mnli

import requests

API_URL = "https://api-inference.huggingface.co/models/facebook/bart-large-mnli"
headers = {"Authorization": f"Bearer {API_TOKEN}"}

def query(payload):
	response = requests.post(API_URL, headers=headers, json=payload)
	return response.json()

output = query({
    "inputs": "Hi, I recently bought a device from your company but it is not working as advertised and I would like to get reimbursed!",
    "parameters": {"candidate_labels": ["refund", "legal", "faq"]},
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant