Spaces:
Sleeping
Sleeping
File size: 406 Bytes
76f5bb2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
from gradio_client import Client
from time import time
client = Client("AccelerationConsortium/branin")
result = client.predict(
3, # float in 'x1' Number component
3, # float in 'x2' Number component
api_name="/predict",
)
print(result)
t0 = time()
results = [client.predict(_, _, api_name="/predict") for _ in range(10)]
print(results)
print(f"Elapsed time: {time() - t0:.2f} seconds")
|