Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -19,7 +19,7 @@ model = Idefics3ForConditionalGeneration.from_pretrained("HuggingFaceM4/idefics3
|
|
19 |
BAD_WORDS_IDS = processor.tokenizer(["<image>", "<fake_token_around_image>"], add_special_tokens=False).input_ids
|
20 |
EOS_WORDS_IDS = [processor.tokenizer.eos_token_id]
|
21 |
|
22 |
-
|
23 |
def model_inference(
|
24 |
images, text, decoding_strategy, temperature, max_new_tokens,
|
25 |
repetition_penalty, top_p
|
|
|
19 |
BAD_WORDS_IDS = processor.tokenizer(["<image>", "<fake_token_around_image>"], add_special_tokens=False).input_ids
|
20 |
EOS_WORDS_IDS = [processor.tokenizer.eos_token_id]
|
21 |
|
22 |
+
@spaces.GPU
|
23 |
def model_inference(
|
24 |
images, text, decoding_strategy, temperature, max_new_tokens,
|
25 |
repetition_penalty, top_p
|