Tonic commited on
Commit
550f132
β€’
1 Parent(s): 5416637

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import gradio as gr
2
  import torch
3
  import sys
@@ -47,6 +48,7 @@ def convert_history(chat_history, max_input_length=1024):
47
  return history_text
48
 
49
  @torch.inference_mode()
 
50
  def instruct(instruction, max_token_output=1024):
51
  input_text = instruction
52
  streamer = TextIteratorStreamer(tokenizer, skip_prompt=True)
 
1
+ import spaces
2
  import gradio as gr
3
  import torch
4
  import sys
 
48
  return history_text
49
 
50
  @torch.inference_mode()
51
+ @spaces.GPU
52
  def instruct(instruction, max_token_output=1024):
53
  input_text = instruction
54
  streamer = TextIteratorStreamer(tokenizer, skip_prompt=True)