davanstrien HF staff commited on
Commit
7798d43
1 Parent(s): d5f8a9a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,4 +1,4 @@
1
- #import spaces
2
  import gradio as gr
3
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
4
  from flores import code_mapping
@@ -34,7 +34,7 @@ def load_tokenizer(src_lang, tgt_lang):
34
  return tokenizer
35
 
36
 
37
- #@spaces.GPU
38
  def translate(text: str, src_lang: str, tgt_lang: str):
39
  tokenizer = load_tokenizer(src_lang, tgt_lang)
40
 
 
1
+ import spaces
2
  import gradio as gr
3
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
4
  from flores import code_mapping
 
34
  return tokenizer
35
 
36
 
37
+ @spaces.GPU
38
  def translate(text: str, src_lang: str, tgt_lang: str):
39
  tokenizer = load_tokenizer(src_lang, tgt_lang)
40