mjbuehler commited on
Commit
db40fad
·
verified ·
1 Parent(s): 1b6c648

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +6 -0
README.md CHANGED
@@ -132,8 +132,14 @@ The curves show an increasing trend of stress with strain, indicating that the m
132
  Next we provide a convenience function for inference. This function takes the model, processor, question, and images, along with messages and images objects for repeated chat-like interactions with the model.
133
 
134
  ```python
 
135
  from transformers.image_utils import load_image
136
 
 
 
 
 
 
137
  def is_url_or_filename(val) -> bool:
138
  # Check if it's a URL
139
  if isinstance(val, str):
 
132
  Next we provide a convenience function for inference. This function takes the model, processor, question, and images, along with messages and images objects for repeated chat-like interactions with the model.
133
 
134
  ```python
135
+ from tqdm.notebook import tqdm
136
  from transformers.image_utils import load_image
137
 
138
+ def ensure_list(obj):
139
+ if not isinstance(obj, list):
140
+ return [obj]
141
+ return obj
142
+
143
  def is_url_or_filename(val) -> bool:
144
  # Check if it's a URL
145
  if isinstance(val, str):