Update app.py
Browse files
app.py
CHANGED
|
@@ -10,8 +10,8 @@ pipe = pipeline("text-generation", model=model, tokenizer=tokenizer)
|
|
| 10 |
|
| 11 |
def chat(user_input, history=[]):
|
| 12 |
prompt = f"{user_input}"
|
| 13 |
-
result = pipe(prompt, max_new_tokens=
|
| 14 |
-
response = result[0]["generated_text"]
|
| 15 |
history.append((user_input, response))
|
| 16 |
return history, history
|
| 17 |
|
|
|
|
| 10 |
|
| 11 |
def chat(user_input, history=[]):
|
| 12 |
prompt = f"{user_input}"
|
| 13 |
+
result = pipe(prompt, max_new_tokens=100, do_sample=True, temperature=0.8)
|
| 14 |
+
response = result[0]["generated_text"]
|
| 15 |
history.append((user_input, response))
|
| 16 |
return history, history
|
| 17 |
|