Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -7,6 +7,7 @@ from PIL import Image
|
|
| 7 |
|
| 8 |
# Import our custom tools from their modules
|
| 9 |
from tools import evaluate_consumption, evaluate_consumption_example
|
|
|
|
| 10 |
|
| 11 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
| 12 |
API_KEY = os.environ.get("API_KEY")
|
|
@@ -24,10 +25,11 @@ headers = {
|
|
| 24 |
# Initialize the weather tool
|
| 25 |
evaluate_consumption = evaluate_consumption()
|
| 26 |
evaluate_consumption_example = evaluate_consumption_example()
|
|
|
|
| 27 |
|
| 28 |
# Create Alfred with all the tools
|
| 29 |
alfred = CodeAgent(
|
| 30 |
-
tools=[evaluate_consumption, evaluate_consumption_example],
|
| 31 |
model=model,
|
| 32 |
additional_authorized_imports=['os'],
|
| 33 |
add_base_tools=True, # Add any additional base tools
|
|
|
|
| 7 |
|
| 8 |
# Import our custom tools from their modules
|
| 9 |
from tools import evaluate_consumption, evaluate_consumption_example
|
| 10 |
+
from retriever import FrugalAI_methods
|
| 11 |
|
| 12 |
HF_TOKEN = os.environ.get("HF_TOKEN")
|
| 13 |
API_KEY = os.environ.get("API_KEY")
|
|
|
|
| 25 |
# Initialize the weather tool
|
| 26 |
evaluate_consumption = evaluate_consumption()
|
| 27 |
evaluate_consumption_example = evaluate_consumption_example()
|
| 28 |
+
FrugalAI_methods=FrugalAI_methods()
|
| 29 |
|
| 30 |
# Create Alfred with all the tools
|
| 31 |
alfred = CodeAgent(
|
| 32 |
+
tools=[evaluate_consumption, evaluate_consumption_example, FrugalAI_methods],
|
| 33 |
model=model,
|
| 34 |
additional_authorized_imports=['os'],
|
| 35 |
add_base_tools=True, # Add any additional base tools
|