Skip to content

Commit

Permalink
adding pip install to notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
vinid committed Jun 13, 2024
1 parent a55b2a6 commit cd982c8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion examples/notebooks/Primitives.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,11 @@
}
],
"source": [
"!pip install textgrad # you might need to restart the notebook after installing textgrad\n",
"\n",
"from textgrad.engine import get_engine\n",
"from textgrad import Variable\n",
"from textgrad.optimizer import TextualGradientDescent\n",
"from dotenv import load_dotenv\n",
"from textgrad.loss import TextLoss\n",
"from dotenv import load_dotenv\n",
"load_dotenv()"
Expand Down
2 changes: 2 additions & 0 deletions examples/notebooks/Prompt-Optimization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@
}
],
"source": [
"!pip install textgrad # you might need to restart the notebook after installing textgrad\n",
"\n",
"import argparse\n",
"import concurrent\n",
"from dotenv import load_dotenv\n",
Expand Down
3 changes: 3 additions & 0 deletions examples/notebooks/Tutorial-Solution-Optimization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@
},
"outputs": [],
"source": [
"!pip install textgrad # you might need to restart the notebook after installing textgrad\n",
"\n",
"\n",
"import textgrad as tg\n",
"tg.set_backward_engine(tg.get_engine(\"gpt-4o\"))\n",
"\n",
Expand Down
2 changes: 2 additions & 0 deletions examples/notebooks/Tutorial-Test-Time-Loss-for-Code.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
"metadata": {},
"outputs": [],
"source": [
"!pip install textgrad # you might need to restart the notebook after installing textgrad\n",
"\n",
"import textgrad as tg\n",
"import random\n",
"import time"
Expand Down

0 comments on commit cd982c8

Please sign in to comment.