LevyJonas commited on
Commit
6248748
·
verified ·
1 Parent(s): 3c5f6aa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -19
app.py CHANGED
@@ -33,7 +33,7 @@ body, .gradio-container{
33
  color: var(--text) !important;
34
  }
35
 
36
- /* Background video layer */
37
  #bg-wrap{
38
  position: fixed;
39
  inset: 0;
@@ -41,13 +41,17 @@ body, .gradio-container{
41
  pointer-events: none;
42
  overflow: hidden;
43
  }
44
- #bg-video{
45
- width: 100%;
46
- height: 100%;
47
- object-fit: cover;
48
- opacity: 0.20;
 
 
 
49
  filter: contrast(1.08) saturate(1.05);
50
  }
 
51
  #bg-overlay{
52
  position:absolute;
53
  inset:0;
@@ -55,7 +59,7 @@ body, .gradio-container{
55
  linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.88) 100%);
56
  }
57
 
58
- /* App container above video */
59
  #app-wrap{
60
  position: relative;
61
  z-index: 1;
@@ -107,13 +111,6 @@ body, .gradio-container{
107
  padding: 16px;
108
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
109
  }
110
- .panel h3{
111
- margin: 0 0 10px;
112
- font-size: 13px;
113
- letter-spacing: 0.6px;
114
- color: var(--muted);
115
- text-transform: uppercase;
116
- }
117
 
118
  /* Inputs */
119
  textarea, input{
@@ -227,14 +224,11 @@ def run_quickstarter(rel_path, prompt, k_retrieve, n_i2i, n_t2i, strength_i2i, s
227
  # ----------------------------
228
  with gr.Blocks(title="Satellite Patch: Retrieve + Generate", css=CSS) as demo:
229
 
230
- # OPTIONAL background video:
231
- # Upload a small loop video to your Space repo at: assets/bg.mp4
232
  # If you don't have it, comment this HTML block out.
233
  gr.HTML("""
234
  <div id="bg-wrap">
235
- <video id="bg-video" autoplay muted loop playsinline>
236
- <source src="<source src="https://huggingface.co/spaces/LevyJonas/SurfaceChangePredictor/resolve/main/assets/bg.mp4" type="video/mp4">" type="video/mp4">
237
- </video>
238
  <div id="bg-overlay"></div>
239
  </div>
240
  """)
 
33
  color: var(--text) !important;
34
  }
35
 
36
+ /* Background image layer */
37
  #bg-wrap{
38
  position: fixed;
39
  inset: 0;
 
41
  pointer-events: none;
42
  overflow: hidden;
43
  }
44
+
45
+ #bg-image{
46
+ position: absolute;
47
+ inset: 0;
48
+ background-image: url("https://huggingface.co/spaces/LevyJonas/SurfaceChangePredictor/resolve/main/assets/bg.jpeg");
49
+ background-size: cover;
50
+ background-position: center;
51
+ opacity: 0.22; /* tweak: 0.15–0.35 */
52
  filter: contrast(1.08) saturate(1.05);
53
  }
54
+
55
  #bg-overlay{
56
  position:absolute;
57
  inset:0;
 
59
  linear-gradient(180deg, rgba(0,0,0,0.45) 0%, rgba(0,0,0,0.88) 100%);
60
  }
61
 
62
+ /* App container above background */
63
  #app-wrap{
64
  position: relative;
65
  z-index: 1;
 
111
  padding: 16px;
112
  box-shadow: 0 10px 40px rgba(0,0,0,0.35);
113
  }
 
 
 
 
 
 
 
114
 
115
  /* Inputs */
116
  textarea, input{
 
224
  # ----------------------------
225
  with gr.Blocks(title="Satellite Patch: Retrieve + Generate", css=CSS) as demo:
226
 
227
+ # OPTIONAL background image:
 
228
  # If you don't have it, comment this HTML block out.
229
  gr.HTML("""
230
  <div id="bg-wrap">
231
+ <div id="bg-image"></div>
 
 
232
  <div id="bg-overlay"></div>
233
  </div>
234
  """)