asrilmurdian commited on
Commit
6b74c30
·
verified ·
1 Parent(s): e9da3c3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
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 Bayhaqy.")
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=["bart-large-cnn", "pegasus_indonesian_base-finetune"])
90
 
91
  # Determine the selected Model
92
- if selected_api_url == "bart-large-cnn":
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
- st.markdown(f"Your article: **{title}**")
128
- st.markdown(f"**{summary}**")
129
 
130
  st.divider()
131
- st.subheader("Summary Library NewsPaper")
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}**")