RalphThings commited on
Commit
9cdc948
·
verified ·
1 Parent(s): d59e706

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -18,13 +18,12 @@ class BasicAgent:
18
  # initialize HF inference pipeline once
19
  if HF_TOKEN is None:
20
  raise ValueError("HF_TOKEN not set in environment")
21
- self.generator = pipeline("text-generation", model="bigscience/bloom-560m")
22
  # The GAIA system prompt (no "FINAL ANSWER:" at the end)
23
  self.system_prompt = (
24
- "You are a general AI assistant. "
25
- "I will ask you a question. Answer in as few words as possible—"
26
- "either a number, a few words, or a comma-separated list—"
27
- "with no extra commentary, prefixes, or units.\n\n"
28
  )
29
  print("BasicAgent initialized with LLM.")
30
 
@@ -34,7 +33,7 @@ class BasicAgent:
34
  # Run the model
35
  out = self.generator(
36
  prompt,
37
- max_new_tokens=50, # leave room for the answer
38
  return_full_text=False
39
  )
40
  answer = out[0]["generated_text"].strip()
 
18
  # initialize HF inference pipeline once
19
  if HF_TOKEN is None:
20
  raise ValueError("HF_TOKEN not set in environment")
21
+ self.generator = pipeline("text-generation", model="EleutherAI/gpt-neo-125M")
22
  # The GAIA system prompt (no "FINAL ANSWER:" at the end)
23
  self.system_prompt = (
24
+ "You are a concise AI assistant. "
25
+ "Answer in as few words as possible—a number, a few words, or a comma-separated list. "
26
+ "No commentary, prefixes, or units.\n\n"
 
27
  )
28
  print("BasicAgent initialized with LLM.")
29
 
 
33
  # Run the model
34
  out = self.generator(
35
  prompt,
36
+ max_new_tokens=16, # leave room for the answer
37
  return_full_text=False
38
  )
39
  answer = out[0]["generated_text"].strip()