Update README.md
Browse files
README.md
CHANGED
@@ -40,7 +40,7 @@ def load_model(model_name):
|
|
40 |
def generate_text(prompt, model, tokenizer):
|
41 |
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
42 |
with torch.no_grad():
|
43 |
-
generated_code = tokenizer.decode(model.generate(**inputs, max_new_tokens=
|
44 |
print(generated_code)
|
45 |
return generated_code
|
46 |
|
@@ -50,7 +50,6 @@ model, tokenizer = load_model(model_name)
|
|
50 |
|
51 |
prompt = "একটি গ্রামের বর্ণনা করুন।"
|
52 |
generated_text = generate_text(prompt, model, tokenizer)
|
53 |
-
print(generated_text)
|
54 |
```
|
55 |
|
56 |
## Training Details
|
|
|
40 |
def generate_text(prompt, model, tokenizer):
|
41 |
inputs = tokenizer(prompt, return_tensors="pt").to("cuda")
|
42 |
with torch.no_grad():
|
43 |
+
generated_code = tokenizer.decode(model.generate(**inputs, max_new_tokens=256, pad_token_id=2)[0], skip_special_tokens=True)
|
44 |
print(generated_code)
|
45 |
return generated_code
|
46 |
|
|
|
50 |
|
51 |
prompt = "একটি গ্রামের বর্ণনা করুন।"
|
52 |
generated_text = generate_text(prompt, model, tokenizer)
|
|
|
53 |
```
|
54 |
|
55 |
## Training Details
|