Spaces:
Runtime error
Runtime error
Commit
ยท
8144a1f
1
Parent(s):
0ab7e65
corrected path references
Browse files
app.py
CHANGED
@@ -182,7 +182,7 @@ elif topic == "Text Summarization":
|
|
182 |
"<h3 style='text-align: center; color:#F63366; font-size:18px;'><b>Japanese News Article Data<b></h3>",
|
183 |
unsafe_allow_html=True)
|
184 |
|
185 |
-
news_articles = pd.read_csv(
|
186 |
random_state=42)
|
187 |
gb = GridOptionsBuilder.from_dataframe(news_articles)
|
188 |
gb.configure_pagination()
|
@@ -202,7 +202,7 @@ elif topic == "Text Summarization":
|
|
202 |
summary_length = st.slider(label="Select the maximum length of summary (่ฆ็ดใฎๆๅคง้ทใ้ธๆใใพใ )", min_value=120,max_value=160,step=5)
|
203 |
|
204 |
if text and st.button("Summarize it! (่ฆ็ดใใใ)"):
|
205 |
-
waitPlaceholder = st.image(
|
206 |
summarization_model_name = "csebuetnlp/mT5_multilingual_XLSum"
|
207 |
tokenizer = AutoTokenizer.from_pretrained(summarization_model_name )
|
208 |
model = AutoModelForSeq2SeqLM.from_pretrained(summarization_model_name )
|
|
|
182 |
"<h3 style='text-align: center; color:#F63366; font-size:18px;'><b>Japanese News Article Data<b></h3>",
|
183 |
unsafe_allow_html=True)
|
184 |
|
185 |
+
news_articles = pd.read_csv("jp_news_articles.csv").sample(frac=0.75,
|
186 |
random_state=42)
|
187 |
gb = GridOptionsBuilder.from_dataframe(news_articles)
|
188 |
gb.configure_pagination()
|
|
|
202 |
summary_length = st.slider(label="Select the maximum length of summary (่ฆ็ดใฎๆๅคง้ทใ้ธๆใใพใ )", min_value=120,max_value=160,step=5)
|
203 |
|
204 |
if text and st.button("Summarize it! (่ฆ็ดใใใ)"):
|
205 |
+
waitPlaceholder = st.image("wait.gif")
|
206 |
summarization_model_name = "csebuetnlp/mT5_multilingual_XLSum"
|
207 |
tokenizer = AutoTokenizer.from_pretrained(summarization_model_name )
|
208 |
model = AutoModelForSeq2SeqLM.from_pretrained(summarization_model_name )
|