Spaces:
Sleeping
Sleeping
Article show
Browse files
app.py
CHANGED
@@ -31,6 +31,14 @@ categories = ["Politics", "Sports", "Weather", "Culture", "Crime"]
|
|
31 |
|
32 |
if st.button("Get tags"):
|
33 |
if news_url.strip():
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
else:
|
36 |
st.write("Please enter a valid news URL.")
|
|
|
31 |
|
32 |
if st.button("Get tags"):
|
33 |
if news_url.strip():
|
34 |
+
article_text = extract_article_text(news_url)
|
35 |
+
|
36 |
+
if article_text.startswith("Error") or article_text.startswith("Could not"):
|
37 |
+
st.write(article_text)
|
38 |
+
else:
|
39 |
+
st.write("**Extracted Article Text:**")
|
40 |
+
st.write(article_text[:500] + "...")
|
41 |
+
|
42 |
+
|
43 |
else:
|
44 |
st.write("Please enter a valid news URL.")
|