LecJackS commited on
Commit
973787d
1 Parent(s): f4fedaa

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +6 -6
index.html CHANGED
@@ -8,12 +8,12 @@
8
  </head>
9
  <body>
10
  <div class="card">
11
- <h1>Wolfram Alpha Tool for HuggingFace Agents</h1>
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>
15
- <h1>Usage instructions:</h1>
16
- <h3>Create and save WolframAlpha APP_ID as an environment variable:</h3>
17
  <code>
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>
@@ -21,17 +21,17 @@ from transformers import load_tool<br>
21
  wolframalpha_tool = load_tool('LecJackS/wolfram-alpha-query')
22
  </code>
23
 
24
- <h3>Test it:</h3>
25
  <code>
26
  query = "Integrate [ log(x)^2 + e^(x^2) dx ]"<br>
27
  print(wolframalpha_tool(query))<br>
28
  </code>
29
 
30
- <h3>Add tool to agent:</h3>
31
  <code>
32
  agent = HfAgent("https://api-inference.huggingface.co/models/bigcode/starcoder", additional_tools=[wolframalpha_tool])
33
  </code>
34
- <h3>Ask the agent to solve some math:</h3>
35
  <code>
36
  res = agent.run("Solve the following equation: Area of circle of radius 2")<br>
37
  print(res)<br>
 
8
  </head>
9
  <body>
10
  <div class="card">
11
+ <h3>Wolfram Alpha Tool for HuggingFace Agents</h3>
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>
15
+ <h2>Usage instructions:</h2>
16
+ <h1>Create and save WolframAlpha APP_ID as an environment variable:</h1>
17
  <code>
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>
 
21
  wolframalpha_tool = load_tool('LecJackS/wolfram-alpha-query')
22
  </code>
23
 
24
+ <h1>Test it:</h1>
25
  <code>
26
  query = "Integrate [ log(x)^2 + e^(x^2) dx ]"<br>
27
  print(wolframalpha_tool(query))<br>
28
  </code>
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>
36
  res = agent.run("Solve the following equation: Area of circle of radius 2")<br>
37
  print(res)<br>