Spaces:
Runtime error
Runtime error
Commit
·
3d7767b
1
Parent(s):
2791dbb
Update pages/3_Abstractive Summary.py
Browse files
pages/3_Abstractive Summary.py
CHANGED
@@ -16,10 +16,11 @@ def load_model():
|
|
16 |
#model = PegasusForConditionalGeneration.from_pretrained(local_pegasus-large_tokenizer_model, max_position_embeddings=2000).to(torch_device)
|
17 |
return model,tokenizer
|
18 |
|
|
|
19 |
#run this the first time and use the local model for faster runtime
|
20 |
tokenizer.save_pretrained("local_pegasus-large_tokenizer")
|
21 |
model.save_pretrained("local_pegasus-large_tokenizer_model")
|
22 |
-
|
23 |
|
24 |
st.header("Abstractive Summurization with PEGASUS-LARGE")
|
25 |
st.text("Try inputting a prompt below!")
|
|
|
16 |
#model = PegasusForConditionalGeneration.from_pretrained(local_pegasus-large_tokenizer_model, max_position_embeddings=2000).to(torch_device)
|
17 |
return model,tokenizer
|
18 |
|
19 |
+
model,tokenizer = load_model()
|
20 |
#run this the first time and use the local model for faster runtime
|
21 |
tokenizer.save_pretrained("local_pegasus-large_tokenizer")
|
22 |
model.save_pretrained("local_pegasus-large_tokenizer_model")
|
23 |
+
|
24 |
|
25 |
st.header("Abstractive Summurization with PEGASUS-LARGE")
|
26 |
st.text("Try inputting a prompt below!")
|