Image-Text-to-Text
English
neonwatty commited on
Commit
b83c8bc
·
verified ·
1 Parent(s): c4db037

Update - small typo in readme

Browse files

A small typo update to the main python block beneath the line

```
You can load the model and perform inference as follows
```

The line defining the user prompt has a single quote (') on one end and a double (") on the other, causing the remainder of the code block to be wrongfully interpreted as a string.

The original line that needs correcting:

```python
user_prompt = '<image>\nDescribe the image."
```

Updated with this PR to use double quotes at start and finish - like so

```python
user_prompt = "<image>\nDescribe the image."
```

This fixes the wrongful interpretation of the remaining code as a string in the block.

Files changed (1) hide show
  1. README.md +1 -1
README.md CHANGED
@@ -44,7 +44,7 @@ vlm.to(device, dtype=torch.bfloat16)
44
  image_url = "https://huggingface.co/adept/fuyu-8b/resolve/main/bus.png"
45
  # image = Image.open(requests.get(image_url, stream=True).raw).convert("RGB")
46
  image = [vlm.vision_backbone.image_transform(Image.open(requests.get(image_url, stream=True).raw).convert("RGB")).unsqueeze(0)]
47
- user_prompt = '<image>\nDescribe the image."
48
 
49
  # Generate!
50
  generated_text = vlm.generate_batch(
 
44
  image_url = "https://huggingface.co/adept/fuyu-8b/resolve/main/bus.png"
45
  # image = Image.open(requests.get(image_url, stream=True).raw).convert("RGB")
46
  image = [vlm.vision_backbone.image_transform(Image.open(requests.get(image_url, stream=True).raw).convert("RGB")).unsqueeze(0)]
47
+ user_prompt = "<image>\nDescribe the image."
48
 
49
  # Generate!
50
  generated_text = vlm.generate_batch(