nikravan commited on
Commit
03037ec
·
verified ·
1 Parent(s): 6f11ed6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -97,9 +97,8 @@ def mode_load(path):
97
 
98
 
99
  @spaces.GPU()
100
- flag=False
101
  def stream_chat(message, history: list, temperature: float, max_length: int, top_p: float, top_k: int, penalty: float):
102
- if flag==False:
103
  model = AutoModelForCausalLM.from_pretrained(
104
  MODEL_ID,
105
  torch_dtype=torch.bfloat16,
 
97
 
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 history.size()==0:
102
  model = AutoModelForCausalLM.from_pretrained(
103
  MODEL_ID,
104
  torch_dtype=torch.bfloat16,