Update app.py
Browse files
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=
|
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:
|