Spaces:
Sleeping
Sleeping
Commit
·
0713efa
1
Parent(s):
e85cffd
Update app.py
Browse files
app.py
CHANGED
@@ -146,7 +146,7 @@ def text2text_summary(para):
|
|
146 |
# from transformers import T5ForConditionalGeneration, T5Tokenizer
|
147 |
# import gradio as grad
|
148 |
# text2text_tkn= T5Tokenizer.from_pretrained("t5-small")
|
149 |
-
mdl = T5ForConditionalGeneration.from_pretrained("t5-small")
|
150 |
def text2text_translation(text):
|
151 |
inp = "translate English to Portuguese: "+text
|
152 |
enc = text2text_tkn(inp, return_tensors="pt", max_length=512, truncation=True)
|
|
|
146 |
# from transformers import T5ForConditionalGeneration, T5Tokenizer
|
147 |
# import gradio as grad
|
148 |
# text2text_tkn= T5Tokenizer.from_pretrained("t5-small")
|
149 |
+
# mdl = T5ForConditionalGeneration.from_pretrained("t5-small")
|
150 |
def text2text_translation(text):
|
151 |
inp = "translate English to Portuguese: "+text
|
152 |
enc = text2text_tkn(inp, return_tensors="pt", max_length=512, truncation=True)
|