rushidarge commited on
Commit
60c33f5
1 Parent(s): b65b1b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +33 -0
app.py CHANGED
@@ -1,4 +1,7 @@
1
  import streamlit as st
 
 
 
2
  import pandas as pd
3
  import pickle
4
  import joblib
@@ -13,6 +16,36 @@ import pickle
13
  import time
14
  from sentence_transformers import SentenceTransformer
15
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  # Create a Streamlit app
17
  st.title("Gallagher : Text Classification and Excel Processing App")
18
 
 
1
  import streamlit as st
2
+ import streamlit as st
3
+ import random
4
+ import requests
5
  import pandas as pd
6
  import pickle
7
  import joblib
 
16
  import time
17
  from sentence_transformers import SentenceTransformer
18
 
19
+ # List of URLs of background images
20
+ background_image_urls = [
21
+ 'https://www.canarahsbclife.com/content/dam/choice/blog-inner/images/what-is-insurance-meaning-and-benefits-of-insurance.jpg',
22
+ 'https://www.avivaindia.com/sites/default/files/Types-of-Insurance.jpg',
23
+ 'https://images.livemint.com/img/2022/09/01/1600x900/Health_Insurance_1662032759457_1662032759610_1662032759610.jpg',
24
+ ]
25
+
26
+ # Randomly select a background image URL
27
+ selected_image_url = random.choice(background_image_urls)
28
+
29
+ # Fetch the selected image from the URL
30
+ response = requests.get(selected_image_url)
31
+
32
+ if response.status_code == 200:
33
+ # Set the background image using CSS
34
+ background_style = f"""
35
+ <style>
36
+ body {{
37
+ background-image: url('{selected_image_url}');
38
+ background-size: cover;
39
+ }}
40
+ </style>
41
+ """
42
+
43
+ # Display the random background image
44
+ st.markdown(background_style, unsafe_allow_html=True)
45
+ else:
46
+ st.warning("Failed to fetch the background image.")
47
+
48
+
49
  # Create a Streamlit app
50
  st.title("Gallagher : Text Classification and Excel Processing App")
51