Spaces:
Sleeping
Sleeping
File size: 456 Bytes
5e9f4d3 3cab2dd 5e9f4d3 3cab2dd 04b61ad 3cab2dd e571d8c 3cab2dd 5e9f4d3 3cab2dd e571d8c |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
import json
import requests
import matplotlib.pyplot as plt
import seaborn as sns
ENDPOINT: str = "http://127.0.0.1:5000/"
request_params = {
"arguments": {
"clusterer": "kmeans-clustering",
"k": 3,
"max_iter": 100,
},
}
headers = {
"Content-Type": "application/json",
}
r = requests.post(
ENDPOINT,
headers=headers,
data=json.dumps(request_params),
)
if __name__ == "__main__":
print(r.json())
|