cazyundee commited on
Commit
024ac84
·
verified ·
1 Parent(s): 8f2c140

Fix Qwen multimodal prompt content

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -602,7 +602,7 @@ def _generate_qwen38(prompt, max_new_tokens=256, temperature=0.7, thinking=True)
602
  max_new_tokens = max(1, min(256, int(max_new_tokens)))
603
  temperature = max(0.0, min(2.0, float(temperature)))
604
  content = prompt
605
- messages = [{"role": "user", "content": content}]
606
  try:
607
  text = processor.apply_chat_template(
608
  messages,
 
602
  max_new_tokens = max(1, min(256, int(max_new_tokens)))
603
  temperature = max(0.0, min(2.0, float(temperature)))
604
  content = prompt
605
+ messages = [{"role": "user", "content": [{"type": "text", "text": content}]}]
606
  try:
607
  text = processor.apply_chat_template(
608
  messages,