QLWD commited on
Commit
f563211
·
verified ·
1 Parent(s): a5243f6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -42,7 +42,7 @@ model = PeftModel.from_pretrained(base_model, LORA_MODEL_PATH)
42
  model = model.to("cuda" if torch.cuda.is_available() else "cpu")
43
 
44
  # 定义推理函数
45
- @spaces.GPU(duration=10)
46
  def stream_chat(message: str, history: list, temperature: float, max_new_tokens: int, top_p: float, top_k: int, penalty: float):
47
  conversation = []
48
  for prompt, answer in history:
 
42
  model = model.to("cuda" if torch.cuda.is_available() else "cpu")
43
 
44
  # 定义推理函数
45
+ @spaces.GPU(duration=30)
46
  def stream_chat(message: str, history: list, temperature: float, max_new_tokens: int, top_p: float, top_k: int, penalty: float):
47
  conversation = []
48
  for prompt, answer in history: