update app
Browse files
app.py
CHANGED
|
@@ -214,10 +214,7 @@ def generate_image(model_name: str, text: str, image: Image.Image,
|
|
| 214 |
text=[prompt_full],
|
| 215 |
images=[image],
|
| 216 |
return_tensors="pt",
|
| 217 |
-
padding=True
|
| 218 |
-
#truncation=True,
|
| 219 |
-
max_length=MAX_INPUT_TOKEN_LENGTH
|
| 220 |
-
).to(device)
|
| 221 |
|
| 222 |
streamer = TextIteratorStreamer(processor, skip_prompt=True, skip_special_tokens=True)
|
| 223 |
generation_kwargs = {
|
|
|
|
| 214 |
text=[prompt_full],
|
| 215 |
images=[image],
|
| 216 |
return_tensors="pt",
|
| 217 |
+
padding=True).to(device)
|
|
|
|
|
|
|
|
|
|
| 218 |
|
| 219 |
streamer = TextIteratorStreamer(processor, skip_prompt=True, skip_special_tokens=True)
|
| 220 |
generation_kwargs = {
|