AksharaSachin commited on
Commit
2b6a599
·
verified ·
1 Parent(s): 5813acb

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +6 -7
agent.py CHANGED
@@ -47,13 +47,12 @@ def build_agent():
47
  # huggingfacehub_api_token=os.getenv("HUGGINGFACEHUB_API_TOKEN")
48
  # )
49
 
50
- llm = HuggingFaceHub(
51
- repo_id = "question-answering", model="deepset/roberta-base-squad2",
52
- model_kwargs={
53
- "temperature": 0.7,
54
- "max_new_tokens": 100
55
- }
56
- )
57
 
58
  tools = [use_wikipedia_tool, use_search_tool]
59
 
 
47
  # huggingfacehub_api_token=os.getenv("HUGGINGFACEHUB_API_TOKEN")
48
  # )
49
 
50
+ llm = HuggingFaceHub(repo_id="distilbert/distilgpt2", task="text-generation",
51
+ model_kwargs={
52
+ "temperature": 0.7, # Controls randomness (0.0 = deterministic)
53
+ "max_new_tokens": 100 # Optional: max output length
54
+ },
55
+ verbose=True)
 
56
 
57
  tools = [use_wikipedia_tool, use_search_tool]
58