Spaces:
Runtime error
Runtime error
Upload app.py
Browse files216 unmodified lines217218219220221222223216 unmodified lines)print("torch.no_grad")# 解碼生成內容後full_text = _hf_tok.decode(output_ids[0], skip_special_tokens=True)gen_text = full_text[len(prompt):] if full_text.startswith(prompt) else full_textlogs.append(f"[LOCAL LLM] raw_len={len(gen_text)}")logs.append(f"[LOCAL LLM] raw_head={gen_text[:200].replace(chr(10),' ')}") # 前 200 字方便 Debug216 unmodified lines217218219220221222223216 unmodified lines)print("torch.no_grad")# 解碼生成內容後full_text = _hf_tok.decode(out_ids[0], skip_special_tokens=True)gen_text = full_text[len(prompt):] if full_text.startswith(prompt) else full_textlogs.append(f"[LOCAL LLM] raw_len={len(gen_text)}")logs.append(f"[LOCAL LLM] raw_head={gen_text[:200].replace(chr(10),' ')}") # 前 200 字方便 Debug
app.py+1-1