Skip to content

Commit

Permalink
rm idefics log
Browse files Browse the repository at this point in the history
  • Loading branch information
kushal-10 committed May 5, 2024
1 parent 1bc7c36 commit 8393903
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions backends/huggingface_multimodal_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,6 @@ def generate_idefics_output(messages: list[Dict],
idefics_input.append('\nAssistant:')
idefics_input = [idefics_input]

print(f"Idefics input - {idefics_input}\n")
inputs = processor(idefics_input, add_end_of_utterance_token=False, return_tensors="pt").to(device)

# Generation args for Idefics
Expand All @@ -187,7 +186,6 @@ def generate_idefics_output(messages: list[Dict],
max_tokens = 2048 # Default value for input max length = 20, set a high value for now
generated_ids = model.generate(**inputs, eos_token_id=exit_condition, bad_words_ids=bad_words_ids, max_length=max_tokens)
generated_text = processor.batch_decode(generated_ids)
print(f"Idefics Output : {generated_text}\n")

return generated_text

Expand Down

0 comments on commit 8393903

Please sign in to comment.