Spaces:
Running
Running
Update index.html
Browse files- index.html +3 -3
index.html
CHANGED
|
@@ -8,7 +8,7 @@
|
|
| 8 |
</head>
|
| 9 |
<body>
|
| 10 |
<div class="card">
|
| 11 |
-
<
|
| 12 |
<h2>Demo Colab Notebook:</h2>
|
| 13 |
|
| 14 |
<a href="https://colab.research.google.com/drive/1wRv65uzfHO3WUJCo1tcRZgadq4XQ-o--">https://colab.research.google.com/drive/1wRv65uzfHO3WUJCo1tcRZgadq4XQ-o--</a><br>
|
|
@@ -18,7 +18,7 @@
|
|
| 18 |
os.environ["WOLFRAM_APP_ID"] = "YOUR_WOLFRAM_APP_ID"<br>
|
| 19 |
# Get it from: <a href="https://products.wolframalpha.com/simple-api/documentation">https://products.wolframalpha.com/simple-api/documentation</a><br>
|
| 20 |
from transformers import load_tool<br>
|
| 21 |
-
wolframalpha_tool = load_tool('LecJackS/wolfram-alpha-query')
|
| 22 |
</code>
|
| 23 |
|
| 24 |
<h1>Test it:</h1>
|
|
@@ -29,7 +29,7 @@ print(wolframalpha_tool(query))<br>
|
|
| 29 |
|
| 30 |
<h1>Add tool to agent:</h1>
|
| 31 |
<code>
|
| 32 |
-
agent = HfAgent("https://api-inference.huggingface.co/models/bigcode/starcoder", additional_tools=[wolframalpha_tool])
|
| 33 |
</code>
|
| 34 |
<h1>Ask the agent to solve some math:</h1>
|
| 35 |
<code>
|
|
|
|
| 8 |
</head>
|
| 9 |
<body>
|
| 10 |
<div class="card">
|
| 11 |
+
<h2>Wolfram Alpha Tool for HuggingFace Agents</h2>
|
| 12 |
<h2>Demo Colab Notebook:</h2>
|
| 13 |
|
| 14 |
<a href="https://colab.research.google.com/drive/1wRv65uzfHO3WUJCo1tcRZgadq4XQ-o--">https://colab.research.google.com/drive/1wRv65uzfHO3WUJCo1tcRZgadq4XQ-o--</a><br>
|
|
|
|
| 18 |
os.environ["WOLFRAM_APP_ID"] = "YOUR_WOLFRAM_APP_ID"<br>
|
| 19 |
# Get it from: <a href="https://products.wolframalpha.com/simple-api/documentation">https://products.wolframalpha.com/simple-api/documentation</a><br>
|
| 20 |
from transformers import load_tool<br>
|
| 21 |
+
wolframalpha_tool = load_tool('LecJackS/wolfram-alpha-query')<br>
|
| 22 |
</code>
|
| 23 |
|
| 24 |
<h1>Test it:</h1>
|
|
|
|
| 29 |
|
| 30 |
<h1>Add tool to agent:</h1>
|
| 31 |
<code>
|
| 32 |
+
agent = HfAgent("https://api-inference.huggingface.co/models/bigcode/starcoder", additional_tools=[wolframalpha_tool])<br>
|
| 33 |
</code>
|
| 34 |
<h1>Ask the agent to solve some math:</h1>
|
| 35 |
<code>
|