Open janibashamd opened 1 month ago
Working solution i want to merge is below.. Please check and give me permission so i can raise a PR
`import requests
API_URL = "https://api-inference.huggingface.co/models/gpt2" headers = {"Authorization": f"Bearer {API_TOKEN}"}
def query(payload): response = requests.post(API_URL, headers=headers, json=payload) return response.json()
data = query({"inputs": "Can you please let us know more details about your "}) print(data[0]['generated_text'])`
Hi,
Python example provided below is not working![image](https://github.com/user-attachments/assets/09762069-5015-4337-aab9-3241fb1d967f)
Check below error:![image](https://github.com/user-attachments/assets/eb7b0bea-79d6-4f95-819b-59d51da2a859)
Let me know if need anything..