Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -17,7 +17,7 @@ with st.container():
|
|
17 |
# Page title layout
|
18 |
st.title("📃 Website Article Summarize")
|
19 |
st.markdown("**Generate summaries of articles from websites using abstractive summarization with Language Model and Library NewsPaper.**")
|
20 |
-
st.caption("Created by
|
21 |
|
22 |
## ............................................... ##
|
23 |
with st.container():
|
@@ -86,10 +86,10 @@ with st.container():
|
|
86 |
headers = {"Authorization": f"Bearer {API_KEY}"}
|
87 |
|
88 |
# Selectbox to choose between API URLs
|
89 |
-
selected_api_url = st.selectbox("Select Model", options=["
|
90 |
|
91 |
# Determine the selected Model
|
92 |
-
if selected_api_url == "
|
93 |
API_URL = "https://api-inference.huggingface.co/models/asrilmurdian/asril-pegasus-model"
|
94 |
|
95 |
with st.container():
|
@@ -121,14 +121,14 @@ with st.container():
|
|
121 |
else:
|
122 |
summary = "Summary not available"
|
123 |
|
124 |
-
st.divider()
|
125 |
-
st.subheader("Summary AI")
|
126 |
-
with st.expander("See Details"):
|
127 |
-
|
128 |
-
|
129 |
|
130 |
st.divider()
|
131 |
-
st.subheader("Summary
|
132 |
with st.expander("See Details"):
|
133 |
st.markdown(f"Your article: **{title}**")
|
134 |
st.markdown(f"**{summ}**")
|
|
|
17 |
# Page title layout
|
18 |
st.title("📃 Website Article Summarize")
|
19 |
st.markdown("**Generate summaries of articles from websites using abstractive summarization with Language Model and Library NewsPaper.**")
|
20 |
+
st.caption("Created by Asril Murdian.")
|
21 |
|
22 |
## ............................................... ##
|
23 |
with st.container():
|
|
|
86 |
headers = {"Authorization": f"Bearer {API_KEY}"}
|
87 |
|
88 |
# Selectbox to choose between API URLs
|
89 |
+
selected_api_url = st.selectbox("Select Model", options=["asril-pegasus-model",])
|
90 |
|
91 |
# Determine the selected Model
|
92 |
+
if selected_api_url == "asril-pegasus-model":
|
93 |
API_URL = "https://api-inference.huggingface.co/models/asrilmurdian/asril-pegasus-model"
|
94 |
|
95 |
with st.container():
|
|
|
121 |
else:
|
122 |
summary = "Summary not available"
|
123 |
|
124 |
+
# st.divider()
|
125 |
+
# st.subheader("Summary AI")
|
126 |
+
# with st.expander("See Details"):
|
127 |
+
# st.markdown(f"Your article: **{title}**")
|
128 |
+
# st.markdown(f"**{summary}**")
|
129 |
|
130 |
st.divider()
|
131 |
+
st.subheader("Summary NewsPaper")
|
132 |
with st.expander("See Details"):
|
133 |
st.markdown(f"Your article: **{title}**")
|
134 |
st.markdown(f"**{summ}**")
|