Spaces:
Build error
Build error
SZhanZ commited on
Commit ·
3d71402
1
Parent(s): 8e743cf
cuda
Browse files44 unmodified lines4546474849505124 unmodified lines7677787980818244 unmodified linesadd_special_tokens=False,)# inputs = inputswith torch.no_grad():generated_ids = model.generate(**inputs, use_cache=True, max_new_tokens=256, do_sample=False)24 unmodified lines# model_path = "/data/shz/project/vlm-r1/VLM-R1/output/Qwen2.5-VL-3B-GRPO-REC/checkpoint-500"model_path = "SZhanZ/Qwen2.5VL-VLM-R1-REC-step500"model = Qwen2_5_VLForConditionalGeneration.from_pretrained(model_path, torch_dtype=torch.float16)processor = AutoProcessor.from_pretrained(model_path)def gradio_interface(image, text):44 unmodified lines4546474849505124 unmodified lines7677787980818244 unmodified linesadd_special_tokens=False,)inputs = inputs.to("cuda")with torch.no_grad():generated_ids = model.generate(**inputs, use_cache=True, max_new_tokens=256, do_sample=False)24 unmodified lines# model_path = "/data/shz/project/vlm-r1/VLM-R1/output/Qwen2.5-VL-3B-GRPO-REC/checkpoint-500"model_path = "SZhanZ/Qwen2.5VL-VLM-R1-REC-step500"model = Qwen2_5_VLForConditionalGeneration.from_pretrained(model_path, torch_dtype=torch.float16, device_map="cuda")processor = AutoProcessor.from_pretrained(model_path)def gradio_interface(image, text):
app.py+2-2