ybelkada commited on
Commit
319e343
Β·
verified Β·
1 Parent(s): 1d742db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -2,6 +2,7 @@ import torch
2
 
3
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
4
  import gradio as gr
 
5
  from threading import Thread
6
 
7
  MODEL = "tiiuae/Falcon3-7B-Instruct-1.58bit"
@@ -36,6 +37,7 @@ model = AutoModelForCausalLM.from_pretrained(
36
 
37
  model = torch.compile(model)
38
 
 
39
  def stream_chat(
40
  message: str,
41
  history: list,
 
2
 
3
  from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
4
  import gradio as gr
5
+ import spaces
6
  from threading import Thread
7
 
8
  MODEL = "tiiuae/Falcon3-7B-Instruct-1.58bit"
 
37
 
38
  model = torch.compile(model)
39
 
40
+ @spaces.GPU
41
  def stream_chat(
42
  message: str,
43
  history: list,