anon-repair-bot commited on
Commit
544ec3f
·
verified ·
1 Parent(s): 8da8e78

Fix: Add newline to fix SyntaxError in example code

Browse files

## Description

The original example code triggers a SyntaxError due to a missing line break between two statements:
```python
from pprint import pprint pprint(fill_mask(f"तिमीलाई कस्तो {tokenizer.mask_token}."))
```


## Changes

Replaced:
```python
from pprint import pprint pprint(fill_mask(...))
```
with:
```python
from pprint import pprint
pprint(fill_mask(...))
```

## Testing
The code has been successfully tested and runs without error.

## Note
This contribution is part of an ongoing research initiative to systematically identify and correct faulty example code in Hugging Face Model Cards.
We would appreciate a timely review and integration of this patch to support code reliability and enhance reproducibility for downstream users.

Files changed (1) hide show
  1. README.md +2 -1
README.md CHANGED
@@ -42,7 +42,8 @@ model = AutoModelForMaskedLM.from_pretrained("Shushant/nepaliBERT")
42
  from transformers import pipeline
43
 
44
  fill_mask = pipeline( "fill-mask", model=model, tokenizer=tokenizer, )
45
- from pprint import pprint pprint(fill_mask(f"तिमीलाई कस्तो {tokenizer.mask_token}."))
 
46
  ```
47
 
48
  ## Data Description
 
42
  from transformers import pipeline
43
 
44
  fill_mask = pipeline( "fill-mask", model=model, tokenizer=tokenizer, )
45
+ from pprint import pprint
46
+ pprint(fill_mask(f"तिमीलाई कस्तो {tokenizer.mask_token}."))
47
  ```
48
 
49
  ## Data Description