Unityraptor commited on
Commit
a9d6e8c
1 Parent(s): 01bb18b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,6 +1,6 @@
1
 
2
  import gradio as gr
3
- import torch
4
 
5
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
6
  device = "cpu"
@@ -9,7 +9,7 @@ tokenizer = AutoTokenizer.from_pretrained("humarin/chatgpt_paraphraser_on_T5_bas
9
 
10
  model = AutoModelForSeq2SeqLM.from_pretrained("humarin/chatgpt_paraphraser_on_T5_base").to(device)
11
 
12
- translator = pipeline(task="translation", model="./models/facebook/nllb-200-distilled-600M", torch_dtype=torch.bfloat16)
13
 
14
  def paraphrase(
15
  question,
 
1
 
2
  import gradio as gr
3
+
4
 
5
  from transformers import AutoTokenizer, AutoModelForSeq2SeqLM, pipeline
6
  device = "cpu"
 
9
 
10
  model = AutoModelForSeq2SeqLM.from_pretrained("humarin/chatgpt_paraphraser_on_T5_base").to(device)
11
 
12
+ translator = pipeline(task="translation", model="./models/facebook/nllb-200-distilled-600M")
13
 
14
  def paraphrase(
15
  question,