fix: change color palette and disposition
Browse files- app/main.py +8 -10
- app/theme.py +7 -5
- app/top_section.py +1 -1
app/main.py
CHANGED
|
@@ -18,12 +18,12 @@ with gr.Blocks(theme=theme, css=css) as demo:
|
|
| 18 |
# ---------------------------------------------------------
|
| 19 |
# Camera
|
| 20 |
with gr.Row():
|
| 21 |
-
with gr.Column(scale=1):
|
| 22 |
-
|
| 23 |
|
| 24 |
# ---------------------------------------------------------
|
| 25 |
# Location
|
| 26 |
-
with gr.Row():
|
| 27 |
with gr.Column(scale=1):
|
| 28 |
location = gr.Textbox(visible=True, interactive=True, label="Location of Sighting")
|
| 29 |
#display location processing
|
|
@@ -31,22 +31,20 @@ with gr.Blocks(theme=theme, css=css) as demo:
|
|
| 31 |
label="Identified GPS Location")
|
| 32 |
with gr.Row():
|
| 33 |
#to clear it
|
| 34 |
-
clear_location = gr.ClearButton(components=[location], visible=True, interactive=True
|
| 35 |
)
|
| 36 |
clear_location.click()
|
| 37 |
#to submit it
|
| 38 |
-
submit_location = gr.Button("
|
| 39 |
submit_location.click(get_location, inputs=[location], outputs=[identified_location])
|
| 40 |
-
|
| 41 |
|
| 42 |
# ---------------------------------------------------------
|
| 43 |
# Dead and Wounded Buttons
|
| 44 |
with gr.Row() as block_form:
|
| 45 |
-
with gr.Column(scale=1):
|
| 46 |
-
butt_dead = gr.Button("Dead", elem_id="dead")
|
| 47 |
-
|
| 48 |
with gr.Column(scale=1):
|
| 49 |
butt_wounded = gr.Button("Wounded", elem_id="wounded")
|
|
|
|
|
|
|
| 50 |
|
| 51 |
# ---------------------------------------------------------
|
| 52 |
# Initiate sections
|
|
@@ -100,7 +98,7 @@ with gr.Blocks(theme=theme, css=css) as demo:
|
|
| 100 |
# ---------------------------------------------------------
|
| 101 |
#Submit Button
|
| 102 |
with gr.Column(scale=1):
|
| 103 |
-
subbutt = gr.Button("
|
| 104 |
output_message = gr.Markdown("Thank you, you are a champion of biodiversity conservation !")
|
| 105 |
|
| 106 |
|
|
|
|
| 18 |
# ---------------------------------------------------------
|
| 19 |
# Camera
|
| 20 |
with gr.Row():
|
| 21 |
+
#with gr.Column(scale=1):
|
| 22 |
+
camera = gr.Image(elem_id="image")
|
| 23 |
|
| 24 |
# ---------------------------------------------------------
|
| 25 |
# Location
|
| 26 |
+
#with gr.Row():
|
| 27 |
with gr.Column(scale=1):
|
| 28 |
location = gr.Textbox(visible=True, interactive=True, label="Location of Sighting")
|
| 29 |
#display location processing
|
|
|
|
| 31 |
label="Identified GPS Location")
|
| 32 |
with gr.Row():
|
| 33 |
#to clear it
|
| 34 |
+
clear_location = gr.ClearButton(components=[location], visible=True, interactive=True, scale=1
|
| 35 |
)
|
| 36 |
clear_location.click()
|
| 37 |
#to submit it
|
| 38 |
+
submit_location = gr.Button("Get GPS Coordinates", visible=True, interactive=True, scale=3)
|
| 39 |
submit_location.click(get_location, inputs=[location], outputs=[identified_location])
|
|
|
|
| 40 |
|
| 41 |
# ---------------------------------------------------------
|
| 42 |
# Dead and Wounded Buttons
|
| 43 |
with gr.Row() as block_form:
|
|
|
|
|
|
|
|
|
|
| 44 |
with gr.Column(scale=1):
|
| 45 |
butt_wounded = gr.Button("Wounded", elem_id="wounded")
|
| 46 |
+
with gr.Column(scale=1):
|
| 47 |
+
butt_dead = gr.Button("Dead", elem_id="dead")
|
| 48 |
|
| 49 |
# ---------------------------------------------------------
|
| 50 |
# Initiate sections
|
|
|
|
| 98 |
# ---------------------------------------------------------
|
| 99 |
#Submit Button
|
| 100 |
with gr.Column(scale=1):
|
| 101 |
+
subbutt = gr.Button("SUBMIT YOUR OBSERVATION TO ORNITHO", elem_id="submit")
|
| 102 |
output_message = gr.Markdown("Thank you, you are a champion of biodiversity conservation !")
|
| 103 |
|
| 104 |
|
app/theme.py
CHANGED
|
@@ -3,12 +3,14 @@ import gradio as gr
|
|
| 3 |
css = """
|
| 4 |
.gradio-container {background: url(https://openclipart.org/image/2000px/279687)}
|
| 5 |
#image {background-color: #73b9ae}
|
| 6 |
-
#dead {background-color: #
|
| 7 |
-
#wounded {background-color: #
|
| 8 |
-
#buttons-conditions {background-color: #
|
| 9 |
-
#dropdown-conditions {background-color: #
|
| 10 |
-
#submit {background-color: #
|
| 11 |
"""
|
|
|
|
|
|
|
| 12 |
|
| 13 |
|
| 14 |
theme = gr.themes.Soft(primary_hue="teal", secondary_hue="teal", neutral_hue="emerald",
|
|
|
|
| 3 |
css = """
|
| 4 |
.gradio-container {background: url(https://openclipart.org/image/2000px/279687)}
|
| 5 |
#image {background-color: #73b9ae}
|
| 6 |
+
#dead {background-color: #333333}
|
| 7 |
+
#wounded {background-color: #5e0724}
|
| 8 |
+
#buttons-conditions {background-color: #b3b3b3}
|
| 9 |
+
#dropdown-conditions {background-color: #b3b3b3}
|
| 10 |
+
#submit {background-color: #91ccb0}
|
| 11 |
"""
|
| 12 |
+
#wound old: #2d5543
|
| 13 |
+
#submit:#13422f
|
| 14 |
|
| 15 |
|
| 16 |
theme = gr.themes.Soft(primary_hue="teal", secondary_hue="teal", neutral_hue="emerald",
|
app/top_section.py
CHANGED
|
@@ -24,7 +24,7 @@ def create_top_section(visible):
|
|
| 24 |
|
| 25 |
def create_dropdown(visible):
|
| 26 |
with gr.Row() as dropdown_row:
|
| 27 |
-
dropdown = gr.Dropdown(choices=[], interactive=
|
| 28 |
openfield_level2 = gr.Textbox(visible=False, elem_id="dropdown-conditions")
|
| 29 |
dropdown_level2 = gr.Dropdown(choices=[], visible=False, elem_id="dropdown-conditions")
|
| 30 |
dropdown_extra_level2 = gr.Dropdown(choices=[], visible=False, elem_id="dropdown-conditions")
|
|
|
|
| 24 |
|
| 25 |
def create_dropdown(visible):
|
| 26 |
with gr.Row() as dropdown_row:
|
| 27 |
+
dropdown = gr.Dropdown(choices=[], interactive=False, visible=visible, elem_id="dropdown-conditions")
|
| 28 |
openfield_level2 = gr.Textbox(visible=False, elem_id="dropdown-conditions")
|
| 29 |
dropdown_level2 = gr.Dropdown(choices=[], visible=False, elem_id="dropdown-conditions")
|
| 30 |
dropdown_extra_level2 = gr.Dropdown(choices=[], visible=False, elem_id="dropdown-conditions")
|