Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -69,15 +69,15 @@ def generate_response(user_message, messages_list, image_pil, max_new_tokens, to
|
|
69 |
top_p=top_p,
|
70 |
top_k=top_k,
|
71 |
temperature=temperature,
|
72 |
-
|
|
|
73 |
)
|
74 |
|
75 |
# Generate output using model's specific method
|
76 |
generate_kwargs = dict(
|
77 |
-
|
78 |
streamer=streamer,
|
79 |
-
generation_config=generation_config
|
80 |
-
tokenizer=processor.tokenizer
|
81 |
)
|
82 |
|
83 |
# Start the generation in a separate thread to allow streaming
|
|
|
69 |
top_p=top_p,
|
70 |
top_k=top_k,
|
71 |
temperature=temperature,
|
72 |
+
eos_token_id=processor.tokenizer.eos_token_id,
|
73 |
+
pad_token_id=processor.tokenizer.pad_token_id
|
74 |
)
|
75 |
|
76 |
# Generate output using model's specific method
|
77 |
generate_kwargs = dict(
|
78 |
+
batch=inputs,
|
79 |
streamer=streamer,
|
80 |
+
generation_config=generation_config
|
|
|
81 |
)
|
82 |
|
83 |
# Start the generation in a separate thread to allow streaming
|