pratyyush commited on
Commit
aece808
·
verified ·
1 Parent(s): 590d753

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +40 -4
app.py CHANGED
@@ -5,6 +5,45 @@ import numpy as np
5
  import cv2
6
  from rembg import remove # For background removal
7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
8
  # Title and Description
9
  st.title("Advanced Image Enhancer and Editor")
10
  st.write("Enhance, edit, and apply AI-powered enhancements to your images!")
@@ -26,9 +65,6 @@ if uploaded_file:
26
  sharpness = st.sidebar.slider("Sharpness", 0.1, 3.0, 1.0)
27
  color = st.sidebar.slider("Color Saturation", 0.1, 3.0, 1.0)
28
 
29
- # Debugging print for color value
30
- st.write(f"Color Value: {color}")
31
-
32
  # Filters
33
  if st.sidebar.checkbox("Apply Filters"):
34
  filter_option = st.sidebar.selectbox("Select a Filter", ["None", "BLUR", "DETAIL", "EDGE_ENHANCE", "SMOOTH"])
@@ -95,4 +131,4 @@ if uploaded_file:
95
  buf = io.BytesIO()
96
  image.save(buf, format="PNG")
97
  byte_im = buf.getvalue()
98
- st.download_button("Download Enhanced Image", data=byte_im, file_name="enhanced_image.png", mime="image/png")
 
5
  import cv2
6
  from rembg import remove # For background removal
7
 
8
+ # ✅ Add custom CSS for black background
9
+ st.markdown(
10
+ """
11
+ <style>
12
+ body, .stApp {
13
+ background-color: black !important;
14
+ color: white !important;
15
+ }
16
+ h1, h2, h3, h4, h5, h6, p, label {
17
+ color: white !important;
18
+ }
19
+ .stButton>button {
20
+ background-color: #4CAF50; /* Green button */
21
+ color: white;
22
+ border: none;
23
+ padding: 10px 20px;
24
+ text-align: center;
25
+ text-decoration: none;
26
+ display: inline-block;
27
+ font-size: 14px;
28
+ margin: 4px 2px;
29
+ transition-duration: 0.4s;
30
+ cursor: pointer;
31
+ }
32
+ .stButton>button:hover {
33
+ background-color: #45a049;
34
+ }
35
+ .stDownloadButton>button {
36
+ background-color: #008CBA; /* Blue button */
37
+ color: white;
38
+ }
39
+ .stDownloadButton>button:hover {
40
+ background-color: #007bb5;
41
+ }
42
+ </style>
43
+ """,
44
+ unsafe_allow_html=True
45
+ )
46
+
47
  # Title and Description
48
  st.title("Advanced Image Enhancer and Editor")
49
  st.write("Enhance, edit, and apply AI-powered enhancements to your images!")
 
65
  sharpness = st.sidebar.slider("Sharpness", 0.1, 3.0, 1.0)
66
  color = st.sidebar.slider("Color Saturation", 0.1, 3.0, 1.0)
67
 
 
 
 
68
  # Filters
69
  if st.sidebar.checkbox("Apply Filters"):
70
  filter_option = st.sidebar.selectbox("Select a Filter", ["None", "BLUR", "DETAIL", "EDGE_ENHANCE", "SMOOTH"])
 
131
  buf = io.BytesIO()
132
  image.save(buf, format="PNG")
133
  byte_im = buf.getvalue()
134
+ st.download_button("Download Enhanced Image", data=byte_im, file_name="enhanced_image.png", mime="image/png")