sayyedAhmed's picture
sample script to use model using api
d19b2cc
raw
history blame contribute delete
434 Bytes
import requests
# Replace with your API URL and token
api_url = "/static-proxy?url=https%3A%2F%2Fapi-inference.huggingface.co%2Fmodels%2FsayyedAhmed%2FCrisis_Severity_Predictor_LSTM%26quot%3B%3C%2Fspan%3E%3C!-- HTML_TAG_END -->
headers = {"Authorization": f"Bearer YOUR_HUGGINGFACE_TOKEN"}
# Define the input data
data = {"inputs": "Example input text for severity prediction"}
# Make the API call
response = requests.post(api_url, headers=headers, json=data)
# Output the response
print(response.json())