Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ritalyu17 authored Oct 5, 2024
1 parent ab36c21 commit eb862eb
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions notebooks/HF-API-random.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,13 @@
}
],
"source": [
"# we duplicate the Advanced Optimization from AC huggingface for private use, to avoid rate limit\n",
"# need to pass your HF token, get your HF token (write access) from https://huggingface.co/settings/tokens\n",
"\n",
"# load the Advanced Optimization from AC huggingface\n",
"from my_secret import get_my_hf_token\n",
"from gradio_client import Client\n",
"client = Client(\"AccelerationConsortium/crabnet-hyperparameter\")\n",
"client = Client.duplicate(\"AccelerationConsortium/crabnet-hyperparameter\", hf_token=get_my_hf_token())\n",
"\n",
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
Expand Down Expand Up @@ -119,8 +123,8 @@
"\n",
" y1 = adv_opt(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10, x11, x12, x13, x14, x15, x16, x17, x18, x19, x20, c1, c2, c3)\n",
" \n",
" # wait 60 seconds before next iteration <---------\n",
" time.sleep(30)\n",
" # # wait 60 seconds before next iteration <---------\n",
" # time.sleep(30)\n",
"\n",
" exp_i.append(y1)\n",
" obj.append(np.array(exp_i))"
Expand Down

0 comments on commit eb862eb

Please sign in to comment.