ybelkada commited on
Commit
4276954
1 Parent(s): d67d5cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -1,4 +1,5 @@
1
  import torch
 
2
 
3
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
4
  import gradio as gr
@@ -38,6 +39,7 @@ if device == "cuda":
38
  model = torch.compile(model)
39
 
40
 
 
41
  def stream_chat(
42
  message: str,
43
  history: list,
 
1
  import torch
2
+ import spaces
3
 
4
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
5
  import gradio as gr
 
39
  model = torch.compile(model)
40
 
41
 
42
+ @spaces.GPU
43
  def stream_chat(
44
  message: str,
45
  history: list,