Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
|