zoya23 commited on
Commit
53d3bea
·
verified ·
1 Parent(s): b3d218a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -47,11 +47,12 @@ if user_input:
47
  formatted_prompt = final_prompt.format_messages(dialogue=user_input)
48
  formatted_prompt = formatted_prompt + formatted_prompt
49
 
50
- # Get response from model
51
  llm = HuggingFaceEndpoint(
52
  repo_id="google/pegasus-xsum",
53
  task="text2text-generation",
54
- model_kwargs={"temperature": 0.3, "max_new_tokens": 128}
 
55
  )
56
  response = llm(formatted_prompt)
57
 
 
47
  formatted_prompt = final_prompt.format_messages(dialogue=user_input)
48
  formatted_prompt = formatted_prompt + formatted_prompt
49
 
50
+ # Get response from model with correct explicit parameters
51
  llm = HuggingFaceEndpoint(
52
  repo_id="google/pegasus-xsum",
53
  task="text2text-generation",
54
+ temperature=0.3, # Explicitly passing temperature here
55
+ max_new_tokens=128 # Explicitly passing max_new_tokens here
56
  )
57
  response = llm(formatted_prompt)
58