File size: 434 Bytes
d19b2cc
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import requests

# Replace with your API URL and token
api_url = "https://api-inference.huggingface.co/models/sayyedAhmed/Crisis_Severity_Predictor_LSTM"
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())