syum-af commited on
Commit
a497214
·
1 Parent(s): e0d8b0f
Files changed (1) hide show
  1. app.py +14 -1
app.py CHANGED
@@ -1,4 +1,7 @@
1
- from smolagents import CodeAgent, DuckDuckGoSearchTool, FinalAnswerTool, InferenceClientModel, Tool, tool, VisitWebpageTool
 
 
 
2
 
3
  @tool
4
  def suggest_menu(occasion: str) -> str:
@@ -60,6 +63,16 @@ class SuperheroPartyThemeTool(Tool):
60
 
61
  return themes.get(category.lower(), "Themed party idea not found. Try 'classic heroes', 'villain masquerade', or 'futuristic Gotham'.")
62
 
 
 
 
 
 
 
 
 
 
 
63
 
64
  # Alfred, the butler, preparing the menu for the party
65
  agent = CodeAgent(
 
1
+ from huggingface_hub import login
2
+ from smolagents import CodeAgent, LiteLLMModel, DuckDuckGoSearchTool, Tool, tool, VisitWebpageTool, FinalAnswerTool
3
+ from dotenv import load_dotenv
4
+ import os
5
 
6
  @tool
7
  def suggest_menu(occasion: str) -> str:
 
63
 
64
  return themes.get(category.lower(), "Themed party idea not found. Try 'classic heroes', 'villain masquerade', or 'futuristic Gotham'.")
65
 
66
+ load_dotenv()
67
+ login(
68
+ token=os.environ["HF_TOKEN"]
69
+ )
70
+
71
+ model = LiteLLMModel(
72
+ model_id="openai/gpt-4.1",
73
+ temperature=0.2,
74
+ api_key=os.environ["OPENAI_API_KEY"]
75
+ )
76
 
77
  # Alfred, the butler, preparing the menu for the party
78
  agent = CodeAgent(