Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -62,7 +62,7 @@ class FalconChatBot:
|
|
62 |
input_ids = tokenizer.encode(conversation, return_tensors="pt", add_special_tokens=False)
|
63 |
|
64 |
# Generate a response using the Falcon model
|
65 |
-
response_text = peft_model.generate(input_ids, max_length=max_length, use_cache=True, early_stopping=True, bos_token_id=peft_model.config.bos_token_id, eos_token_id=peft_model.config.eos_token_id, pad_token_id=peft_model.config.eos_token_id, temperature=0.4, do_sample=True)
|
66 |
|
67 |
# Generate the formatted conversation in Falcon message format
|
68 |
conversation = f"{system_prompt}\n"
|
|
|
62 |
input_ids = tokenizer.encode(conversation, return_tensors="pt", add_special_tokens=False)
|
63 |
|
64 |
# Generate a response using the Falcon model
|
65 |
+
response_text = peft_model.generate(input_ids=input_ids, max_length=max_length, use_cache=True, early_stopping=True, bos_token_id=peft_model.config.bos_token_id, eos_token_id=peft_model.config.eos_token_id, pad_token_id=peft_model.config.eos_token_id, temperature=0.4, do_sample=True)
|
66 |
|
67 |
# Generate the formatted conversation in Falcon message format
|
68 |
conversation = f"{system_prompt}\n"
|