yuhuili commited on
Commit
5324549
1 Parent(s): c93b9fd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -73,7 +73,7 @@ def highlight_text(text, text_list,color="black"):
73
 
74
  return result
75
 
76
- @spaces.GPU
77
  def warmup(model):
78
  conv = get_conversation_template(args.model_type)
79
 
@@ -93,7 +93,7 @@ def warmup(model):
93
  input_ids = torch.as_tensor(input_ids).cuda()
94
  for output_ids in model.ea_generate(input_ids):
95
  ol=output_ids.shape[1]
96
- @spaces.GPU
97
  def bot(history, temperature, top_p, use_EaInfer, highlight_EaInfer,session_state,):
98
  if not history:
99
  return history, "0.00 tokens/s", "0.00", session_state
 
73
 
74
  return result
75
 
76
+ @spaces.GPU(duration=30)
77
  def warmup(model):
78
  conv = get_conversation_template(args.model_type)
79
 
 
93
  input_ids = torch.as_tensor(input_ids).cuda()
94
  for output_ids in model.ea_generate(input_ids):
95
  ol=output_ids.shape[1]
96
+ @spaces.GPU(duration=30)
97
  def bot(history, temperature, top_p, use_EaInfer, highlight_EaInfer,session_state,):
98
  if not history:
99
  return history, "0.00 tokens/s", "0.00", session_state