Spaces:
Paused
Paused
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
|
@@ -27,7 +27,8 @@ def generate(prompt, history):
|
|
| 27 |
pad_token_id=tokenizer.eos_token_id,
|
| 28 |
)
|
| 29 |
response = tokenizer.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
|
| 30 |
-
history.append(
|
|
|
|
| 31 |
return "", history
|
| 32 |
|
| 33 |
theme = (
|
|
|
|
| 27 |
pad_token_id=tokenizer.eos_token_id,
|
| 28 |
)
|
| 29 |
response = tokenizer.decode(out[0][inputs.input_ids.shape[1]:], skip_special_tokens=True)
|
| 30 |
+
history.append({"role": "user", "content": prompt})
|
| 31 |
+
history.append({"role": "assistant", "content": response.strip()})
|
| 32 |
return "", history
|
| 33 |
|
| 34 |
theme = (
|