edwardb1203 commited on
Commit
823db43
1 Parent(s): 46baab8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -1,12 +1,12 @@
1
- from transformers import LEDTokenizer, LEDForConditionalGeneration
2
  import torch
3
  import re
4
  import gradio as gr
5
  import os
6
  import docx2txt
7
 
8
- tokenizer = LEDTokenizer.from_pretrained("nalmy/abstract-comp590")
9
- model = LEDForConditionalGeneration.from_pretrained("nalmy/abstract-comp590").to("cuda").half()
10
 
11
  def summarize(text_file):
12
  file_extension = os.path.splitext(text_file.name)[1]
 
1
+ from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
2
  import torch
3
  import re
4
  import gradio as gr
5
  import os
6
  import docx2txt
7
 
8
+ tokenizer = AutoTokenizer.from_pretrained("allenai/led-base-16384")
9
+ model = AutoModelForSeq2SeqLM.from_pretrained("checkpoint-64840").to("cuda").half()
10
 
11
  def summarize(text_file):
12
  file_extension = os.path.splitext(text_file.name)[1]