MINHCT commited on
Commit
6aca57a
β€’
1 Parent(s): 2278639

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -113,7 +113,7 @@ def categorize(url):
113
 
114
  # Main App
115
  st.header('Classification Project')
116
- st.subheader("Unsure what category a CNN article belongs to? Our clever tool can help! Paste the URL below and press Enter. We'll sort it into one of our 5 categories in a flash! ⚑️")
117
 
118
  # Define category information (modify content and bullet points as needed)
119
  categories = {
@@ -143,8 +143,8 @@ categories = {
143
  "Stay updated on celebrity news and cultural trends."
144
  ]
145
  }
146
- # Create expanders contain list of category can be classified
147
- with st.expander("Category Information"):
148
  # Title for each category
149
  st.subheader("Available Categories:")
150
  for category in categories.keys():
@@ -168,9 +168,8 @@ with st.expander("Tips", expanded=True):
168
 
169
  url = st.text_input("Find your favorite CNN story! Paste the URL here.", placeholder='Ex: https://edition.cnn.com/2012/01/31/health/frank-njenga-mental-health/index.html')
170
 
171
- st.divider() # πŸ‘ˆ Draws a horizontal rule
172
-
173
  if url:
 
174
  result = categorize(url)
175
  article_content = result.get('Article_Content')
176
  st.text_area("Article Content", value=article_content, height=400) # render the article content as textarea element
 
113
 
114
  # Main App
115
  st.header('Classification Project')
116
+ st.write("Unsure what category a CNN article belongs to? Our clever tool can help! Paste the URL below and press Enter. We'll sort it into one of our 5 categories in a flash! ⚑️")
117
 
118
  # Define category information (modify content and bullet points as needed)
119
  categories = {
 
143
  "Stay updated on celebrity news and cultural trends."
144
  ]
145
  }
146
+ # Create expanders containing list of category can be classified
147
+ with st.expander("Category List"):
148
  # Title for each category
149
  st.subheader("Available Categories:")
150
  for category in categories.keys():
 
168
 
169
  url = st.text_input("Find your favorite CNN story! Paste the URL here.", placeholder='Ex: https://edition.cnn.com/2012/01/31/health/frank-njenga-mental-health/index.html')
170
 
 
 
171
  if url:
172
+ st.divider() # πŸ‘ˆ Draws a horizontal rule
173
  result = categorize(url)
174
  article_content = result.get('Article_Content')
175
  st.text_area("Article Content", value=article_content, height=400) # render the article content as textarea element