executor / test.py
leandro
cleanup
ff98df2
raw
history blame
281 Bytes
import requests
org_or_user = "lvwerra"
space_name = "executor"
url = f"https://{org_or_user}-{space_name}.hf.space/health"
print(requests.get(url).json())
url = f"https://{org_or_user}-{space_name}.hf.space/execute"
print(requests.post(url, json={'code': 'print(1+1)'}).json())