Shrivathsan20 commited on
Commit
e932677
·
verified ·
1 Parent(s): 534e841

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -101,10 +101,11 @@ def stream_chat(message, history: list, temperature: float, max_length: int, top
101
 
102
  model = AutoModelForCausalLM.from_pretrained(
103
  MODEL_ID,
104
- torch_dtype=torch.bfloat16,
105
- low_cpu_mem_usage=True,
106
- trust_remote_code=True
107
  )
 
108
 
109
  print(f'message is - {message}')
110
  print(f'history is - {history}')
@@ -243,7 +244,7 @@ with gr.Blocks(css=CSS, theme="soft", fill_height=True) as demo:
243
  ),
244
  ],
245
  ),
246
- gr.Examples(EXAMPLES, [chat_input])
247
 
248
  if __name__ == "__main__":
249
 
 
101
 
102
  model = AutoModelForCausalLM.from_pretrained(
103
  MODEL_ID,
104
+ torch_dtype=torch.float32, # Use float32 for CPU
105
+ trust_remote_code=True,
106
+ low_cpu_mem_usage=True # Optimize for CPU
107
  )
108
+
109
 
110
  print(f'message is - {message}')
111
  print(f'history is - {history}')
 
244
  ),
245
  ],
246
  ),
247
+ #gr.LExamples(EXAMPES, [chat_input])
248
 
249
  if __name__ == "__main__":
250