Spaces:
Build error
Build error
updates to app.py
Browse files
app.py
CHANGED
@@ -1,9 +1,9 @@
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
-
from transformers import AutoTokenizer,
|
4 |
|
5 |
tokenizer = AutoTokenizer.from_pretrained("mmcquade11/autonlp-reuters-summarization-34018133")
|
6 |
-
model =
|
7 |
|
8 |
def summarize(text):
|
9 |
input_ids = torch.tensor(tokenizer.encode(text, add_special_tokens=True)).unsqueeze(0)
|
|
|
1 |
import gradio as gr
|
2 |
import torch
|
3 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
4 |
|
5 |
tokenizer = AutoTokenizer.from_pretrained("mmcquade11/autonlp-reuters-summarization-34018133")
|
6 |
+
model = AutoModelForSeq2SeqLM.from_pretrained("mmcquade11/autonlp-reuters-summarization-34018133")
|
7 |
|
8 |
def summarize(text):
|
9 |
input_ids = torch.tensor(tokenizer.encode(text, add_special_tokens=True)).unsqueeze(0)
|