Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -259,6 +259,27 @@ emojis = {
|
|
| 259 |
' Fulfillment ': '😊'}
|
| 260 |
|
| 261 |
def main():
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 262 |
st.title("Text Sentiment Classifier")
|
| 263 |
selected_text = st.selectbox("Select Text", data['Text'].tolist())
|
| 264 |
if st.button("Predict"):
|
|
|
|
| 259 |
' Fulfillment ': '😊'}
|
| 260 |
|
| 261 |
def main():
|
| 262 |
+
background_image = 'https://miro.medium.com/v2/resize:fit:689/0*xv_GA6M5AX3NQztr.jpg'
|
| 263 |
+
html_code = f"""
|
| 264 |
+
<style>
|
| 265 |
+
body {{
|
| 266 |
+
background-image: url('{background_image}');
|
| 267 |
+
background-size: cover;
|
| 268 |
+
background-position: center;
|
| 269 |
+
background-repeat: no-repeat;
|
| 270 |
+
height: 100vh; /* Set the height of the background to fill the viewport */
|
| 271 |
+
margin: 0; /* Remove default body margin */
|
| 272 |
+
display: flex;
|
| 273 |
+
flex-direction: column;
|
| 274 |
+
justify-content: center;
|
| 275 |
+
align-items: center;
|
| 276 |
+
}}
|
| 277 |
+
.stApp {{
|
| 278 |
+
background: none; /* Remove Streamlit app background */
|
| 279 |
+
}}
|
| 280 |
+
</style>
|
| 281 |
+
"""
|
| 282 |
+
st.markdown(html_code, unsafe_allow_html=True)
|
| 283 |
st.title("Text Sentiment Classifier")
|
| 284 |
selected_text = st.selectbox("Select Text", data['Text'].tolist())
|
| 285 |
if st.button("Predict"):
|