anon-repair-bot commited on
Commit
d5f8d85
·
verified ·
1 Parent(s): 353689b

Fix: Replace non-executable >>> prompt style with valid syntax in example code

Browse files

## Description

The original example code contains REPL-style `>>>` prompts, which violate Hugging Face's standard for executable Model Card examples.

## Changes

All lines prefixed with `>>>` were replaced with syntactically valid Python code or comments.
For expected outputs, lines such as:

Replaced:
```python
>>> a woman sitting on the beach with her dog
```
with:
```python
# >>> a woman sitting on the beach with her dog
```

## 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 +1 -1
README.md CHANGED
@@ -121,7 +121,7 @@ inputs = processor(raw_image, return_tensors="pt").to("cuda", torch.float16)
121
 
122
  out = model.generate(**inputs)
123
  print(processor.decode(out[0], skip_special_tokens=True))
124
- >>> a woman sitting on the beach with her dog
125
  ```
126
  </details>
127
 
 
121
 
122
  out = model.generate(**inputs)
123
  print(processor.decode(out[0], skip_special_tokens=True))
124
+ # >>> a woman sitting on the beach with her dog
125
  ```
126
  </details>
127