DragonProgrammer commited on
Commit
ac13bdb
·
verified ·
1 Parent(s): 5618428

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -227,12 +227,12 @@ class HfAgentWrapper:
227
  print(f"Prepared Tool objects with names: {[tool.name for tool in self.actual_tools_for_agent]}")
228
 
229
  # --- Step 3: Pass the PRE-INITIALIZED pipeline object to HfAgent ---
230
- print("Initializing MyCustomHfAgent with the pre-created pipeline...")
231
- self.agent = MyCustomHfAgent( # <<< --- USE YOUR NEW CUSTOM CLASS
232
- llm_pipeline,
233
  additional_tools=self.actual_tools_for_agent
234
  )
235
- print("MyCustomHfAgent successfully instantiated.")
236
 
237
  except Exception as e:
238
  print(f"CRITICAL ERROR: Failed to initialize HfAgent or Pipeline: {e}")
 
227
  print(f"Prepared Tool objects with names: {[tool.name for tool in self.actual_tools_for_agent]}")
228
 
229
  # --- Step 3: Pass the PRE-INITIALIZED pipeline object to HfAgent ---
230
+ print("Initializing HfAgent with the pre-created pipeline...")
231
+ self.agent = HfAgent(
232
+ llm_pipeline, # Pass the pipeline object directly as the first argument
233
  additional_tools=self.actual_tools_for_agent
234
  )
235
+ print("HfAgent successfully instantiated with pre-initialized pipeline.")
236
 
237
  except Exception as e:
238
  print(f"CRITICAL ERROR: Failed to initialize HfAgent or Pipeline: {e}")