Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ def getLLamaresponse(input_text):
|
|
| 15 |
#prompt = "I want to drink water"
|
| 16 |
|
| 17 |
# Run text generation pipeline with the model
|
| 18 |
-
pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=50, do_sample=True)
|
| 19 |
result = pipe(f"<s>[INST] {input_text} [/INST]")
|
| 20 |
# print(result[0]['generated_text'])
|
| 21 |
return result[0]['generated_text']
|
|
|
|
| 15 |
#prompt = "I want to drink water"
|
| 16 |
|
| 17 |
# Run text generation pipeline with the model
|
| 18 |
+
pipe = pipeline(task="text-generation", model=model, tokenizer=tokenizer, max_length=50, do_sample=True, repetition_penalty=1.9)
|
| 19 |
result = pipe(f"<s>[INST] {input_text} [/INST]")
|
| 20 |
# print(result[0]['generated_text'])
|
| 21 |
return result[0]['generated_text']
|