parkerjj commited on
Commit
479b95f
·
1 Parent(s): 8ec911f

优化输入文本打印逻辑,限制输出长度以提高可读性

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -52,7 +52,7 @@ async def predict(request: PredictRequest):
52
  try:
53
  input_text = request.text # FastAPI 会自动解析为 PredictRequest 对象
54
  affected_stock_codes = request.stock_codes
55
- print("Input text:", input_text)
56
  print("Affected stock codes:", affected_stock_codes)
57
  return predict(input_text, affected_stock_codes)
58
  except Exception as e:
 
52
  try:
53
  input_text = request.text # FastAPI 会自动解析为 PredictRequest 对象
54
  affected_stock_codes = request.stock_codes
55
+ print("Input text:", input_text[:200] if len(input_text) > 200 else input_text)
56
  print("Affected stock codes:", affected_stock_codes)
57
  return predict(input_text, affected_stock_codes)
58
  except Exception as e: