Spaces:
Sleeping
Sleeping
File size: 478 Bytes
7aa2125 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import requests
# URL of the deployed API (replace with your actual space URL)
url = "https://<your-space-name>.hf.space/predict"
# Sample input data
data = {
"absolute_magnitude_h": 22.1,
"estimated_diameter_min_km": 0.127,
"estimated_diameter_max_km": 0.285,
"relative_velocity_km_per_sec": 5.67,
"miss_distance_km": 386000.0
}
# Make a request to the API
response = requests.post(url, json=data)
# Display the prediction result
print(response.json())
|