Spaces:
Running
Running
chore: update UI
Browse files
app.py
CHANGED
@@ -110,16 +110,10 @@ def categorize(url):
|
|
110 |
else:
|
111 |
return {"error_message": error}
|
112 |
|
|
|
113 |
# Main App
|
114 |
st.header('Classification Project')
|
115 |
-
st.subheader
|
116 |
-
(
|
117 |
-
'''
|
118 |
-
Unsure what category a CNN article belongs to?
|
119 |
-
Our clever tool can help!
|
120 |
-
Paste the URL below and press Enter. We'll sort it into one of our 5 categories in a flash! ⚡️
|
121 |
-
'''
|
122 |
-
)
|
123 |
|
124 |
# Define category information (modify content and bullet points as needed)
|
125 |
categories = {
|
@@ -150,9 +144,15 @@ categories = {
|
|
150 |
]
|
151 |
}
|
152 |
# Create expanders contain list of category can be classified
|
153 |
-
|
154 |
-
|
155 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
156 |
for item in content:
|
157 |
st.write(f"- {item}")
|
158 |
|
|
|
110 |
else:
|
111 |
return {"error_message": error}
|
112 |
|
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 = {
|
|
|
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():
|
151 |
+
st.write(f"- {category}")
|
152 |
+
# Content for each category (separated by a horizontal line)
|
153 |
+
st.write("---")
|
154 |
+
for category, content in categories.items():
|
155 |
+
st.subheader(category)
|
156 |
for item in content:
|
157 |
st.write(f"- {item}")
|
158 |
|