lixin4ever commited on
Commit
37d11bf
1 Parent(s): 6939cbd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1273,7 +1273,7 @@ def chat_response_stream_multiturn(
1273
  assert len(gen) == 1, f'{gen}'
1274
  item = next(iter(gen.values()))
1275
  cur_out = item.outputs[0].text
1276
- cur_out = "Our system is under maintenance, will be back soon!"
1277
  if j >= max_tokens - 2:
1278
  gr.Warning(f'The response hits limit of {max_tokens} tokens. Consider increase the max tokens parameter in the Additional Inputs.')
1279
 
@@ -1633,8 +1633,8 @@ def batch_inference(
1633
  )
1634
 
1635
  generated = llm.generate(full_prompts, sampling_params, use_tqdm=False)
1636
- #responses = [g.outputs[0].text for g in generated]
1637
- responses = ["Our system is under maintenance, will be back soon!" for g in generated]
1638
  if len(responses) != len(all_items):
1639
  raise gr.Error(f'inconsistent lengths {len(responses)} != {len(all_items)}')
1640
 
 
1273
  assert len(gen) == 1, f'{gen}'
1274
  item = next(iter(gen.values()))
1275
  cur_out = item.outputs[0].text
1276
+ #cur_out = "Our system is under maintenance, will be back soon!"
1277
  if j >= max_tokens - 2:
1278
  gr.Warning(f'The response hits limit of {max_tokens} tokens. Consider increase the max tokens parameter in the Additional Inputs.')
1279
 
 
1633
  )
1634
 
1635
  generated = llm.generate(full_prompts, sampling_params, use_tqdm=False)
1636
+ responses = [g.outputs[0].text for g in generated]
1637
+ #responses = ["Our system is under maintenance, will be back soon!" for g in generated]
1638
  if len(responses) != len(all_items):
1639
  raise gr.Error(f'inconsistent lengths {len(responses)} != {len(all_items)}')
1640