devkushal75 commited on
Commit
d3450b8
·
verified ·
1 Parent(s): 7a2a265

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -41,7 +41,7 @@ def generate_response(prompt, max_tokens=150, temperature=0.7):
41
  Uses LLAMA-CPP to generate a response for the given prompt.
42
  Note: Removed echo=True to avoid repeating the prompt.
43
  """
44
- output = llm(prompt, max_tokens=max_tokens, temperature=temperature) # echo removed
45
  response = output["choices"][0]["text"]
46
  return response.strip()
47
 
 
41
  Uses LLAMA-CPP to generate a response for the given prompt.
42
  Note: Removed echo=True to avoid repeating the prompt.
43
  """
44
+ output = llm(prompt, max_tokens=max_tokens, temperature=temperature, stop=["User:"]) # echo removed
45
  response = output["choices"][0]["text"]
46
  return response.strip()
47