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

Test stonk news headline with api call, fine if it fails #6

Open
FriendlyUser opened this issue Sep 12, 2022 · 0 comments
Open

Test stonk news headline with api call, fine if it fails #6

FriendlyUser opened this issue Sep 12, 2022 · 0 comments

Comments

@FriendlyUser
Copy link
Member

API_URL = "https://api-inference.huggingface.co/models/FriendlyUser/autotrain-stonk_news_headlines-1435453651"
headers = {"Authorization": "Bearer "}

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

output = query({
"inputs": "I like you. I love you",
})

Try to add it in when attempting to recommend news.

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