yuchenlin commited on
Commit
ca73284
1 Parent(s): 9e97b4b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,7 +5,7 @@ import spaces
5
  # Load model and tokenizer
6
  model_name = "yuchenlin/Rex-v0.1-0.5B"
7
 
8
- device = "cpu" # the device to load the model onto
9
  tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True, rex_size=3)
10
  model = AutoModelForCausalLM.from_pretrained(
11
  model_name,
@@ -13,7 +13,7 @@ model = AutoModelForCausalLM.from_pretrained(
13
  )
14
  model.to(device)
15
 
16
- # @spaces.GPU(enable_queue=True)
17
  def respond(
18
  message,
19
  history: list[tuple[str, str]],
 
5
  # Load model and tokenizer
6
  model_name = "yuchenlin/Rex-v0.1-0.5B"
7
 
8
+ device = "cuda" # the device to load the model onto
9
  tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True, rex_size=3)
10
  model = AutoModelForCausalLM.from_pretrained(
11
  model_name,
 
13
  )
14
  model.to(device)
15
 
16
+ @spaces.GPU(enable_queue=True)
17
  def respond(
18
  message,
19
  history: list[tuple[str, str]],