fix: 修复 eval_vlm.py 中 f-string 引号嵌套导致的语法错误

- 修正第 66 行 print 语句中单双引号嵌套冲突的问题。
- 解决在部分 Python 版本下因反斜杠处理导致的 SyntaxError。
pull/113/head
DJY 2026-04-01 15:11:38 +08:00
parent 14cfa88629
commit eac29745da
2 changed files with 3 additions and 1 deletions

View File

@ -63,7 +63,8 @@ def main():
inputs = tokenizer(inputs_text, return_tensors="pt", truncation=True).to(args.device)
print(f'[图像]: {image_file}')
print(f'💬: {prompt.replace('\n', '\\n')}')
display_prompt = prompt.replace('\n', '\\n')
print(f'💬: {display_prompt}')
print('🤖: ', end='')
st = time.time()
generated_ids = model.generate(

@ -0,0 +1 @@
Subproject commit 9327b4fe10ef8352fa3a32eddc8d3c8bff984286