Spaces:
Sleeping
Sleeping
YasirAbdali
commited on
Commit
•
f069082
1
Parent(s):
635c9b8
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,11 @@
|
|
1 |
import torch
|
2 |
-
from transformers import AutoTokenizer,
|
3 |
import streamlit as st
|
4 |
|
5 |
# Load GPT-2 model and tokenizer
|
6 |
model_name = "YasirAbdali/bart-summarization"
|
7 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
8 |
-
model =
|
9 |
|
10 |
# Streamlit app
|
11 |
st.title("Summary Generator")
|
|
|
1 |
import torch
|
2 |
+
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
|
3 |
import streamlit as st
|
4 |
|
5 |
# Load GPT-2 model and tokenizer
|
6 |
model_name = "YasirAbdali/bart-summarization"
|
7 |
tokenizer = AutoTokenizer.from_pretrained(model_name)
|
8 |
+
model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
|
9 |
|
10 |
# Streamlit app
|
11 |
st.title("Summary Generator")
|