YAMITEK commited on
Commit
aadcc42
·
verified ·
1 Parent(s): 366a69d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -7
app.py CHANGED
@@ -23,7 +23,6 @@ st.markdown("""
23
  overflow: auto; /* Enables scrolling if the page content overflows */
24
  # position : relative
25
  }
26
-
27
  /* Adjust opacity of overlay to make content more visible */
28
  .stApp::before {
29
  content: "";
@@ -35,19 +34,16 @@ st.markdown("""
35
  background-color: rgba(255, 255, 255, 0.8); /* Slightly higher opacity */
36
  z-index: -1;
37
  }
38
-
39
  /* Ensure content appears above the overlay */
40
  .stApp > * {
41
  position: relative;
42
  z-index: 2;
43
  }
44
-
45
  /* Ensure the dataframe is visible */
46
  .dataframe {
47
  background-color: rgba(255, 255, 255, 0.9) !important;
48
  z-index: 3;
49
  }
50
-
51
  /* Style text elements for better visibility */
52
  h1, h3, span, div {
53
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.2);
@@ -60,7 +56,6 @@ st.markdown("""
60
  font-size: 24px !important; /* Change font size */
61
  font-weight: bold !important; /* Make text bold */
62
  }
63
-
64
  /* Custom CSS for image caption */
65
  .custom-caption {
66
  color: #000000 !important; /* Change to your desired color */
@@ -135,7 +130,7 @@ def load_model():
135
  @st.cache_data
136
  def load_data():
137
 
138
- y_test = pd.read_csv('Test.csv')
139
 
140
  imgs = y_test["Path"].values
141
  labels = y_test["ClassId"].values
@@ -143,7 +138,7 @@ def load_data():
143
  test_images = []
144
  for img in imgs:
145
  if isinstance(img,str):
146
- image = Image.open('Test/'+img)
147
  image = image.resize([30, 30])
148
  test_images.append(np.array(image))
149
 
 
23
  overflow: auto; /* Enables scrolling if the page content overflows */
24
  # position : relative
25
  }
 
26
  /* Adjust opacity of overlay to make content more visible */
27
  .stApp::before {
28
  content: "";
 
34
  background-color: rgba(255, 255, 255, 0.8); /* Slightly higher opacity */
35
  z-index: -1;
36
  }
 
37
  /* Ensure content appears above the overlay */
38
  .stApp > * {
39
  position: relative;
40
  z-index: 2;
41
  }
 
42
  /* Ensure the dataframe is visible */
43
  .dataframe {
44
  background-color: rgba(255, 255, 255, 0.9) !important;
45
  z-index: 3;
46
  }
 
47
  /* Style text elements for better visibility */
48
  h1, h3, span, div {
49
  text-shadow: 1px 1px 2px rgba(255, 255, 255, 0.2);
 
56
  font-size: 24px !important; /* Change font size */
57
  font-weight: bold !important; /* Make text bold */
58
  }
 
59
  /* Custom CSS for image caption */
60
  .custom-caption {
61
  color: #000000 !important; /* Change to your desired color */
 
130
  @st.cache_data
131
  def load_data():
132
 
133
+ y_test = pd.read_csv('traffic_lights/Test.csv')
134
 
135
  imgs = y_test["Path"].values
136
  labels = y_test["ClassId"].values
 
138
  test_images = []
139
  for img in imgs:
140
  if isinstance(img,str):
141
+ image = Image.open('traffic_lights/'+img)
142
  image = image.resize([30, 30])
143
  test_images.append(np.array(image))
144