pvduy commited on
Commit
f33abea
1 Parent(s): ddb71e2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,6 +1,6 @@
1
  import argparse
2
  import os
3
- #import spaces
4
 
5
 
6
  #hack install gradio
@@ -23,7 +23,7 @@ def parse_args():
23
  parser.add_argument("--n_gpus", type=int, default=1) # n_gpu
24
  return parser.parse_args()
25
 
26
- #@spaces.GPU()
27
  def predict(message, history, system_prompt, temperature, max_tokens):
28
  global model, tokenizer, device
29
  instruction = "<|im_start|>system\nA chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n<|im_end|>\n"
 
1
  import argparse
2
  import os
3
+ import spaces
4
 
5
 
6
  #hack install gradio
 
23
  parser.add_argument("--n_gpus", type=int, default=1) # n_gpu
24
  return parser.parse_args()
25
 
26
+ @spaces.GPU()
27
  def predict(message, history, system_prompt, temperature, max_tokens):
28
  global model, tokenizer, device
29
  instruction = "<|im_start|>system\nA chat between a curious user and an artificial intelligence assistant. The assistant gives helpful, detailed, and polite answers to the user's questions.\n<|im_end|>\n"