Spaces:
Running
Running
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -14,9 +14,11 @@ from langchain_community.utilities.wikipedia import WikipediaAPIWrapper
|
|
| 14 |
|
| 15 |
from settings import *
|
| 16 |
|
|
|
|
|
|
|
| 17 |
NUMERIC_PROFILE = ["Laser Cutting", "Wood Working", "Wood CNC", "Metal Machining", "Metal CNC", "3D Printer", "Welding", "Electronics"]
|
| 18 |
|
| 19 |
-
|
| 20 |
|
| 21 |
def load_data_from_huggingface():
|
| 22 |
"""
|
|
@@ -679,6 +681,11 @@ class PathFinding(smolagents.tools.Tool):
|
|
| 679 |
|
| 680 |
# Agent
|
| 681 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 682 |
techspark_definition = """
|
| 683 |
TechSpark is the largest makerspace at CMU (Carnegie Mellon University), located in the College of Engineering. 
|
| 684 |
Its mission is to promote a vibrant, student-centric making culture to enhance educational, extracurricular, and research activities across the entire campus community.
|
|
@@ -704,11 +711,6 @@ system_prompt = f"""
|
|
| 704 |
{instruction}
|
| 705 |
"""
|
| 706 |
|
| 707 |
-
model = smolagents.OpenAIServerModel(
|
| 708 |
-
model_id="gpt-4.1-mini",
|
| 709 |
-
api_key=OPENAI_API,
|
| 710 |
-
)
|
| 711 |
-
|
| 712 |
agent = smolagents.CodeAgent(
|
| 713 |
tools=[
|
| 714 |
smolagents.FinalAnswerTool(),
|
|
|
|
| 14 |
|
| 15 |
from settings import *
|
| 16 |
|
| 17 |
+
# Load Data
|
| 18 |
+
|
| 19 |
NUMERIC_PROFILE = ["Laser Cutting", "Wood Working", "Wood CNC", "Metal Machining", "Metal CNC", "3D Printer", "Welding", "Electronics"]
|
| 20 |
|
| 21 |
+
login(hf_token)
|
| 22 |
|
| 23 |
def load_data_from_huggingface():
|
| 24 |
"""
|
|
|
|
| 681 |
|
| 682 |
# Agent
|
| 683 |
|
| 684 |
+
model = smolagents.OpenAIServerModel(
|
| 685 |
+
model_id="gpt-4.1-mini",
|
| 686 |
+
api_key=OPENAI_API,
|
| 687 |
+
)
|
| 688 |
+
|
| 689 |
techspark_definition = """
|
| 690 |
TechSpark is the largest makerspace at CMU (Carnegie Mellon University), located in the College of Engineering. 
|
| 691 |
Its mission is to promote a vibrant, student-centric making culture to enhance educational, extracurricular, and research activities across the entire campus community.
|
|
|
|
| 711 |
{instruction}
|
| 712 |
"""
|
| 713 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 714 |
agent = smolagents.CodeAgent(
|
| 715 |
tools=[
|
| 716 |
smolagents.FinalAnswerTool(),
|