Update README.md
Browse files
README.md
CHANGED
@@ -49,13 +49,13 @@ generated_ids = model.generate(
|
|
49 |
generated_text = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
50 |
|
51 |
# Specify `cleanup_and_extract=False` in order to see the raw model generation.
|
52 |
-
processed_text = processor.
|
53 |
|
54 |
print(processed_text)
|
55 |
# `<grounding> An image of<phrase> a snowman</phrase><object><patch_index_0044><patch_index_0863></object> warming himself by<phrase> a fire</phrase><object><patch_index_0005><patch_index_0911></object>.`
|
56 |
|
57 |
# By default, the generated text is cleanup and the entities are extracted.
|
58 |
-
processed_text, entities = processor.
|
59 |
|
60 |
print(processed_text)
|
61 |
# `An image of a snowman warming himself by a fire.`
|
|
|
49 |
generated_text = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
|
50 |
|
51 |
# Specify `cleanup_and_extract=False` in order to see the raw model generation.
|
52 |
+
processed_text = processor.post_process_generation(generated_text, cleanup_and_extract=False)
|
53 |
|
54 |
print(processed_text)
|
55 |
# `<grounding> An image of<phrase> a snowman</phrase><object><patch_index_0044><patch_index_0863></object> warming himself by<phrase> a fire</phrase><object><patch_index_0005><patch_index_0911></object>.`
|
56 |
|
57 |
# By default, the generated text is cleanup and the entities are extracted.
|
58 |
+
processed_text, entities = processor.post_process_generation(generated_text)
|
59 |
|
60 |
print(processed_text)
|
61 |
# `An image of a snowman warming himself by a fire.`
|