Sukanth07 commited on
Commit
41d3a9f
·
1 Parent(s): 2765cb2

"Updated CSS styles and added elem_classes to gr.Image and gr.Number components in app.py"

Browse files
Files changed (2) hide show
  1. app.py +9 -9
  2. src/utils.py +5 -4
app.py CHANGED
@@ -31,7 +31,7 @@ with gr.Blocks(css=utils.css, js=utils.js, theme=gr.themes.Ocean(primary_hue=gr.
31
  with gr.Row():
32
  with gr.Column(scale=5):
33
  # Image upload
34
- image_input = gr.Image(type="pil", label="Upload Image", height=177)
35
 
36
  with gr.Column(scale=5):
37
  longitude = gr.Number(label="Longitude")
@@ -39,20 +39,20 @@ with gr.Blocks(css=utils.css, js=utils.js, theme=gr.themes.Ocean(primary_hue=gr.
39
 
40
  with gr.Row():
41
  with gr.Column(scale=5):
42
- cloud_cover = gr.Number(label="Monthly Cloud Cover")
43
- evapotranspiration = gr.Number(label="Potential EvapoTranspiration")
44
 
45
  with gr.Column(scale=5):
46
- precipitation = gr.Number(label="Precipitation")
47
- min_temp = gr.Number(label="Minimum Temperature")
48
 
49
  with gr.Column(scale=5):
50
- mean_temp = gr.Number(label="Mean Temperature")
51
- max_temp = gr.Number(label="Maximum Temperature")
52
 
53
  with gr.Column(scale=5):
54
- vapour_pressure = gr.Number(label="Vapour Pressure")
55
- wet_day_freq = gr.Number(label="Wet Day Frequency")
56
 
57
  with gr.Row():
58
  predict_button = gr.Button("Predict", variant="primary")
 
31
  with gr.Row():
32
  with gr.Column(scale=5):
33
  # Image upload
34
+ image_input = gr.Image(type="pil", label="Upload Image", height=177, elem_classes="image-input")
35
 
36
  with gr.Column(scale=5):
37
  longitude = gr.Number(label="Longitude")
 
39
 
40
  with gr.Row():
41
  with gr.Column(scale=5):
42
+ cloud_cover = gr.Number(label="Monthly Cloud Cover", elem_classes="num-input")
43
+ evapotranspiration = gr.Number(label="Potential EvapoTranspiration", elem_classes="num-input")
44
 
45
  with gr.Column(scale=5):
46
+ precipitation = gr.Number(label="Precipitation", elem_classes="num-input")
47
+ min_temp = gr.Number(label="Minimum Temperature", elem_classes="num-input")
48
 
49
  with gr.Column(scale=5):
50
+ mean_temp = gr.Number(label="Mean Temperature", elem_classes="num-input")
51
+ max_temp = gr.Number(label="Maximum Temperature", elem_classes="num-input")
52
 
53
  with gr.Column(scale=5):
54
+ vapour_pressure = gr.Number(label="Vapour Pressure", elem_classes="num-input")
55
+ wet_day_freq = gr.Number(label="Wet Day Frequency", elem_classes="num-input")
56
 
57
  with gr.Row():
58
  predict_button = gr.Button("Predict", variant="primary")
src/utils.py CHANGED
@@ -25,16 +25,13 @@ css="""
25
  }
26
 
27
  .title {
 
28
  font-family: 'Trebuchet MS';
29
  text-align: center;
30
  padding: 10px 0;
31
  background-color: #1f2121;
32
  }
33
 
34
- input, textarea{
35
- background-color: #18191a;
36
- }
37
-
38
  #output-container {
39
  max-height: 400px;
40
  overflow-y: auto;
@@ -43,6 +40,10 @@ css="""
43
  border-radius: 5px;
44
  }
45
 
 
 
 
 
46
  """
47
 
48
  js = """
 
25
  }
26
 
27
  .title {
28
+ color: fff !important;
29
  font-family: 'Trebuchet MS';
30
  text-align: center;
31
  padding: 10px 0;
32
  background-color: #1f2121;
33
  }
34
 
 
 
 
 
35
  #output-container {
36
  max-height: 400px;
37
  overflow-y: auto;
 
40
  border-radius: 5px;
41
  }
42
 
43
+ .image-input, .num-input{
44
+ backgroud-color: #1f2121 !important;
45
+ }
46
+
47
  """
48
 
49
  js = """