import requests
import json
user_reviews = [
"I loved the product! It was easy to use and had a great user interface.",
"The product was okay, but the customer support could be better.",
"I had a terrible experience with the product. It didn't work as advertised and customer service was unhelpful."
]
params = {
"model": "llama-3.1-8b",
"inputs": user_reviews,
"system_prompt": "Classify the review as positive, neutral, or negative.",
}
headers = {
"Authorization": "Key <YOUR_API_KEY>",
"Content-Type": "application/json"
}
response = requests.post("https://api.sutro.sh/batch-inference", json=params, headers=headers)
results = response.json()