Views
No views yet
[!IMPORTANT]
We build an automated poetry data annotation pipeline driven by Prompt Engineering and powered by the Gemini-2.5-Pro API. A total of 2,369 images were processed: 2,345 successfully annotated, and 24 filtered out as unsuitable for poem generation. Using the 2,345 successfully annotated image–poem pairs, we perform Supervised Fine-Tuning (SFT) with the LoRA method via the open-source project LLaMA-Factory (hiyouga/LLaMA-Factory: Unified Efficient Fine-Tuning of 100+ LLMs & VLMs (ACL 2024)), applying it to Qwen2.5-VL-7B and obtaining a high-quality fine-tuned model. We provide a Web UI dedicated to generating poetry from images. It supports three generation modes: invoking the Gemini-2.5-Pro API, using the original Qwen2.5-VL-7B model, and loading the LoRA fine-tuned Qwen2.5-VL-7B model. Users can upload an image and supply a custom prompt to steer style, theme, tone, or form, enabling personalized poetic output.
1git clone https://github.com/hiyouga/LLaMA-Factory.git
2conda create -n llama_factory python=3.10
3conda activate llama_factory
4cd LLaMA-Factory
5pip install -e '.[torch,metrics]'
6pip install -q -U google-genai
7pip install qwen_vl_utils1git clone https://github.com/lawrencewjx58/Vison_NLP_Project.git
2cd Vison_NLP_Project
3python generate.pypython delete.pypython merge.pypython count.pypython transform.pyhuggingface-cli download --resume-download Qwen/Qwen2.5-VL-7B-Instruct --local-dir {your_path} --local-dir-use-symlinks False --token {your_token}1cd LLaMA-Factory
2llamafactory-cli webui1cd Vison_NLP_Project
2python UI_Web.py