Spaces:
Sleeping
Sleeping
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") | |