lopera47 commited on
Commit
a8bcfdc
·
verified ·
1 Parent(s): 61a17e0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -37,7 +37,8 @@ class BasicAgent:
37
  # Initialize the Agent
38
  model = InferenceClientModel(
39
  model_id="tiiuae/falcon-7b-instruct",
40
- token=os.getenv("HUGGINGFACEHUB_API_TOKEN")
 
41
  )
42
 
43
  self.agent = CodeAgent(
@@ -47,7 +48,7 @@ class BasicAgent:
47
 
48
  def __call__(self, question: str) -> str:
49
  print(f"Agent received question (first 50 chars): {question[:50]}...")
50
- print("Your token:", repr(os.getenv("HUGGINGFACEHUB_API_TOKEN"))) ##########
51
  try:
52
  # Example: replace this with your actual inference call
53
  response = self.agent.run(question)
 
37
  # Initialize the Agent
38
  model = InferenceClientModel(
39
  model_id="tiiuae/falcon-7b-instruct",
40
+ token=os.getenv("HUGGINGFACEHUB_API_TOKEN"),
41
+ provider="huggingface"
42
  )
43
 
44
  self.agent = CodeAgent(
 
48
 
49
  def __call__(self, question: str) -> str:
50
  print(f"Agent received question (first 50 chars): {question[:50]}...")
51
+ #print("Your token:", repr(os.getenv("HUGGINGFACEHUB_API_TOKEN"))) ##########
52
  try:
53
  # Example: replace this with your actual inference call
54
  response = self.agent.run(question)