Spaces:
Runtime error
Runtime error
AkashKhamkar
commited on
Commit
•
9485796
1
Parent(s):
ac7577f
Update app.py
Browse files
app.py
CHANGED
@@ -25,7 +25,7 @@ device = 'cuda' if cuda.is_available() else 'cpu'
|
|
25 |
|
26 |
def clean_text(link,start,end):
|
27 |
|
28 |
-
tokenizer = AutoTokenizer.from_pretrained("
|
29 |
sym_spell = SymSpell(max_dictionary_edit_distance=2, prefix_length=7)
|
30 |
dictionary_path = pkg_resources.resource_filename(
|
31 |
"symspellpy", "frequency_dictionary_en_82_765.txt"
|
@@ -202,8 +202,8 @@ def clean_text(link,start,end):
|
|
202 |
def t5_summarizer(link,start, end):
|
203 |
input_text = clean_text(link,start,end)
|
204 |
lst_outputs = []
|
205 |
-
tokenizer1 = AutoTokenizer.from_pretrained("CareerNinja/
|
206 |
-
model1 = AutoModelForSeq2SeqLM.from_pretrained("CareerNinja/
|
207 |
summarizer1 = pipeline("summarization", model=model1, tokenizer=tokenizer1)
|
208 |
print(f""" Entered summarizer ! """)
|
209 |
st.write('Below is the summary of the given URL: ')
|
|
|
25 |
|
26 |
def clean_text(link,start,end):
|
27 |
|
28 |
+
tokenizer = AutoTokenizer.from_pretrained("CareerNinja/t5_large_1e-4_on_V3dataset")
|
29 |
sym_spell = SymSpell(max_dictionary_edit_distance=2, prefix_length=7)
|
30 |
dictionary_path = pkg_resources.resource_filename(
|
31 |
"symspellpy", "frequency_dictionary_en_82_765.txt"
|
|
|
202 |
def t5_summarizer(link,start, end):
|
203 |
input_text = clean_text(link,start,end)
|
204 |
lst_outputs = []
|
205 |
+
tokenizer1 = AutoTokenizer.from_pretrained("CareerNinja/t5_large_1e-4_on_V3dataset")
|
206 |
+
model1 = AutoModelForSeq2SeqLM.from_pretrained("CareerNinja/t5_large_1e-4_on_V3dataset")
|
207 |
summarizer1 = pipeline("summarization", model=model1, tokenizer=tokenizer1)
|
208 |
print(f""" Entered summarizer ! """)
|
209 |
st.write('Below is the summary of the given URL: ')
|