haoranranranran commited on
Commit
28c0e8c
·
verified ·
1 Parent(s): 718ebf4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -5,7 +5,14 @@ import inspect
5
  import pandas as pd
6
  from smolagents import CodeAgent, HfApiModel
7
  from smolagents.tools import PythonInterpreterTool, DuckDuckGoSearchTool
 
 
8
 
 
 
 
 
 
9
  # --- Constants ---
10
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
11
 
 
5
  import pandas as pd
6
  from smolagents import CodeAgent, HfApiModel
7
  from smolagents.tools import PythonInterpreterTool, DuckDuckGoSearchTool
8
+ import subprocess
9
+ import sys
10
 
11
+ def install_package(package):
12
+ subprocess.check_call([sys.executable, "-m", "pip", "install", package])
13
+
14
+ # 使用示例
15
+ install_package("smolagents")
16
  # --- Constants ---
17
  DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
18