mmcquade commited on
Commit
4629047
1 Parent(s): 50f6c1a

updates to app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1,9 +1,9 @@
1
  import gradio as gr
2
  import torch
3
- from transformers import AutoTokenizer, AutoModelWithLMHead
4
 
5
  tokenizer = AutoTokenizer.from_pretrained("mmcquade11/autonlp-reuters-summarization-34018133")
6
- model = AutoModelWithLMHead.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)
 
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)