Update app.py
Browse files
app.py
CHANGED
@@ -98,7 +98,7 @@ def mode_load(path):
|
|
98 |
|
99 |
@spaces.GPU()
|
100 |
def stream_chat(message, history: list, temperature: float, max_length: int, top_p: float, top_k: int, penalty: float):
|
101 |
-
if
|
102 |
model = AutoModelForCausalLM.from_pretrained(
|
103 |
MODEL_ID,
|
104 |
torch_dtype=torch.bfloat16,
|
|
|
98 |
|
99 |
@spaces.GPU()
|
100 |
def stream_chat(message, history: list, temperature: float, max_length: int, top_p: float, top_k: int, penalty: float):
|
101 |
+
if len(history)==0:
|
102 |
model = AutoModelForCausalLM.from_pretrained(
|
103 |
MODEL_ID,
|
104 |
torch_dtype=torch.bfloat16,
|