Update README.md
Browse files
README.md
CHANGED
@@ -78,7 +78,6 @@ def generate_response(message: str, temperature: float = 0.4, repetition_penalty
|
|
78 |
input_ids = tokenizer.encode(
|
79 |
message, return_tensors="pt"
|
80 |
).to(device)
|
81 |
-
|
82 |
# Generate the response
|
83 |
output = model.generate(
|
84 |
input_ids,
|
@@ -87,11 +86,9 @@ def generate_response(message: str, temperature: float = 0.4, repetition_penalty
|
|
87 |
repetition_penalty=repetition_penalty,
|
88 |
do_sample=True
|
89 |
)
|
90 |
-
|
91 |
# Decode the generated output
|
92 |
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
|
93 |
return generated_text
|
94 |
-
|
95 |
message = "Scientists have made a breakthrough in renewable energy by developing a new type of"
|
96 |
response = generate_response(message)
|
97 |
print(response)
|
|
|
78 |
input_ids = tokenizer.encode(
|
79 |
message, return_tensors="pt"
|
80 |
).to(device)
|
|
|
81 |
# Generate the response
|
82 |
output = model.generate(
|
83 |
input_ids,
|
|
|
86 |
repetition_penalty=repetition_penalty,
|
87 |
do_sample=True
|
88 |
)
|
|
|
89 |
# Decode the generated output
|
90 |
generated_text = tokenizer.decode(output[0], skip_special_tokens=True)
|
91 |
return generated_text
|
|
|
92 |
message = "Scientists have made a breakthrough in renewable energy by developing a new type of"
|
93 |
response = generate_response(message)
|
94 |
print(response)
|