Skip to content

Commit 0c503a0

Browse files
committed
docs: Add steps to reproduce
Document steps to reproduce, and correct the wrong filename for the dataset.
1 parent 31b96c6 commit 0c503a0

File tree

9 files changed

+66
-14
lines changed

9 files changed

+66
-14
lines changed

README.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,55 @@ We present REBUS: a collection of 333 hand-crafted rebuses spanning 13 diverse c
2323
| CogVLM | 0.9 | 1.6 | 0.0 | 0.0 |
2424
| QWEN | 0.9 | 1.6 | 0.0 | 0.0 |
2525
| InstructBLIP | 0.6 | 0.5 | 0.9 | 0.0 |
26+
27+
## Steps to Reproduce
28+
29+
1. Install [Python](https://www.python.org).
30+
31+
1. Install the [package installer for Python](https://pypi.org/project/pip/) (pip).
32+
33+
1. Install the imported packages:
34+
35+
- torch
36+
37+
`pip install torch`
38+
39+
- requests
40+
41+
`pip install requests`
42+
43+
- PIL
44+
45+
`pip install Pillow`
46+
47+
- transformers
48+
49+
`pip install transformers`
50+
51+
- openai
52+
53+
`pip install openai`
54+
55+
- matplotlib
56+
57+
`pip install matplotlib`
58+
59+
- tiktoken
60+
61+
`pip install tiktoken`
62+
63+
- transformers_stream_generator
64+
65+
`pip install transformers_stream_generator`
66+
67+
- einops
68+
69+
`pip install einops`
70+
71+
- torchvision
72+
73+
`pip install tochvision`
74+
75+
1. Run the scripts in `eval_scripts/`, for example `blip.py`:
76+
77+
- `python ./eval_scripts/blip.py`

eval_scripts/blip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
from transformers import Blip2Processor, Blip2ForConditionalGeneration
88

99

10-
# 1. Load datasaet
10+
# 1. Load dataset
1111

1212
rows = []
1313

14-
with open('dataset.csv', mode='r', encoding='utf-8') as file:
14+
with open('data.csv', mode='r', encoding='utf-8') as file:
1515
csv_reader = csv.reader(file)
1616

1717
headers = next(csv_reader)

eval_scripts/coglvm.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
from PIL import Image
66
from transformers import LlamaTokenizer, AutoModelForCausalLM
77

8-
# 1. Load datasaet
8+
# 1. Load dataset
99

1010
rows = []
1111

12-
with open('dataset.csv', mode='r', encoding='utf-8') as file:
12+
with open('data.csv', mode='r', encoding='utf-8') as file:
1313
csv_reader = csv.reader(file)
1414

1515
headers = next(csv_reader)

eval_scripts/gemini.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
rows = []
1010

11-
with open('dataset.csv', mode='r', encoding='utf-8') as file:
11+
with open('data.csv', mode='r', encoding='utf-8') as file:
1212
csv_reader = csv.reader(file)
1313

1414
headers = next(csv_reader)

eval_scripts/gpt-4v.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
rows = []
88

9-
with open('dataset.csv', mode='r', encoding='utf-8') as file:
9+
with open('data.csv', mode='r', encoding='utf-8') as file:
1010
csv_reader = csv.reader(file)
1111

1212
headers = next(csv_reader)

eval_scripts/instructblip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
import requests
88

99

10-
# 1. Load datasaet
10+
# 1. Load dataset
1111

1212
rows = []
1313

14-
with open('dataset.csv', mode='r', encoding='utf-8') as file:
14+
with open('data.csv', mode='r', encoding='utf-8') as file:
1515
csv_reader = csv.reader(file)
1616

1717
headers = next(csv_reader)

eval_scripts/llava_13b.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
import torch
77
from transformers import pipeline
88

9-
# 1. Load datasaet
9+
# 1. Load dataset
1010

1111
rows = []
1212

13-
with open('dataset.csv', mode='r', encoding='utf-8') as file:
13+
with open('data.csv', mode='r', encoding='utf-8') as file:
1414
csv_reader = csv.reader(file)
1515

1616
headers = next(csv_reader)

eval_scripts/llava_7b.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66
import torch
77
from transformers import pipeline
88

9-
# 1. Load datasaet
9+
# 1. Load dataset
1010

1111
rows = []
1212

13-
with open('dataset.csv', mode='r', encoding='utf-8') as file:
13+
with open('data.csv', mode='r', encoding='utf-8') as file:
1414
csv_reader = csv.reader(file)
1515

1616
headers = next(csv_reader)

eval_scripts/qwen.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@
33

44
from transformers import AutoModelForCausalLM, AutoTokenizer
55

6-
# 1. Load datasaet
6+
# 1. Load dataset
77

88
rows = []
99

10-
with open('dataset.csv', mode='r', encoding='utf-8') as file:
10+
with open('data.csv', mode='r', encoding='utf-8') as file:
1111
csv_reader = csv.reader(file)
1212

1313
headers = next(csv_reader)

0 commit comments

Comments
 (0)