alrichardbollans commited on
Commit
bbb29cb
·
verified ·
1 Parent(s): af51f51

implementing_feedback (#3)

Browse files

- Add legend for image colours. (8ab132714ce8220cec09e2161b2c083d226eecbd)

Files changed (2) hide show
  1. app.py +9 -4
  2. styles.css +2 -2
app.py CHANGED
@@ -154,7 +154,7 @@ app_ui = ui.page_fluid(
154
  ui.a("GitHub", href=protocol_url, target="_blank", **{'aria-label': 'Image taking protocols'}),
155
  ". The protocol will shortly be available in English, Indonesian, Thai, French, Spanish, Portuguese, Arabic, Mandarin, Malagasy and Japanese."),
156
  ui.p(
157
- "To use this app, upload images and click 'Analyse'."
158
  " Segmented images will be displayed in the right-hand panel, showing viable seeds in red, non-viable in yellow and empty in black."
159
  " An opacity slider can be used to adjust the transparency of the segmentation masks."
160
  " The counts will also be displayed as text and results can be downloaded using the 'Download Results' button, providing a data "
@@ -175,6 +175,7 @@ app_ui = ui.page_fluid(
175
  ui.a("HuggingFace Space", href=discussion_url, target="_blank", **{'aria-label': 'Project discussion space'}), '.'
176
  ),
177
  ui.p(disclaimer_text),
 
178
 
179
  class_="body-bar"
180
 
@@ -370,9 +371,13 @@ def server(input, output, session: Session):
370
  ui.div(
371
  ui.h5(r['filename'], style="margin-top: 15px;"),
372
  ui.div(
373
- ui.span(f"Viable = {r.get('viable', '? ')}", style="margin: 0 15px;"),
374
- ui.span(f"Non-Viable = {r.get('non-viable', '? ')}", style="margin: 0 15px;"),
375
- ui.span(f"Empty = {r.get('empty', '? ')}", style="margin: 0 15px;"),
 
 
 
 
376
  ui.span(f"Total = {r.get('total', '? ')}", style="margin: 0 15px;"),
377
  class_="results-text"
378
  ),
 
154
  ui.a("GitHub", href=protocol_url, target="_blank", **{'aria-label': 'Image taking protocols'}),
155
  ". The protocol will shortly be available in English, Indonesian, Thai, French, Spanish, Portuguese, Arabic, Mandarin, Malagasy and Japanese."),
156
  ui.p(
157
+ "To use this app, upload images* and click 'Analyse'."
158
  " Segmented images will be displayed in the right-hand panel, showing viable seeds in red, non-viable in yellow and empty in black."
159
  " An opacity slider can be used to adjust the transparency of the segmentation masks."
160
  " The counts will also be displayed as text and results can be downloaded using the 'Download Results' button, providing a data "
 
175
  ui.a("HuggingFace Space", href=discussion_url, target="_blank", **{'aria-label': 'Project discussion space'}), '.'
176
  ),
177
  ui.p(disclaimer_text),
178
+ ui.p("* Images are stored temporarily on HuggingFace servers and deleted and the end of your session."),
179
 
180
  class_="body-bar"
181
 
 
371
  ui.div(
372
  ui.h5(r['filename'], style="margin-top: 15px;"),
373
  ui.div(
374
+ ui.span(f"Viable ",
375
+ ui.HTML('(<span style="color: rgba(255,0,0,1); font-weight:bold;">&#9632</span>)'),
376
+ f" = {r.get('viable', '? ')}", style="margin: 0 15px;"),
377
+ ui.span(f"Non-Viable ", ui.HTML('(<span style="color: rgba(220,220,0,1); font-weight:bold">&#9632</span>)'),
378
+ f" = {r.get('non-viable', '? ')}", style="margin: 0 15px;"),
379
+ ui.span(f"Empty ", ui.HTML('(<span style="color: rgba(0,0,0,0.5); font-weight:bold">&#9632</span>)'),
380
+ f" = {r.get('empty', '? ')}", style="margin: 0 15px;"),
381
  ui.span(f"Total = {r.get('total', '? ')}", style="margin: 0 15px;"),
382
  class_="results-text"
383
  ),
styles.css CHANGED
@@ -96,7 +96,7 @@ position: sticky;
96
 
97
  /* Upload button styling */
98
  .btn-file {
99
- background-color: #357abd;
100
  color: white !important;
101
  border-radius: 8px;
102
  padding: 10px 20px;
@@ -109,7 +109,7 @@ position: sticky;
109
 
110
  /* Analyze button styling */
111
  .btn-success {
112
- background-color: #357abd !important;
113
  border: none;
114
  border-radius: 8px;
115
  padding: 12px 25px;
 
96
 
97
  /* Upload button styling */
98
  .btn-file {
99
+ background-color: #2F6BA7;
100
  color: white !important;
101
  border-radius: 8px;
102
  padding: 10px 20px;
 
109
 
110
  /* Analyze button styling */
111
  .btn-success {
112
+ background-color: #2F6BA7 !important;
113
  border: none;
114
  border-radius: 8px;
115
  padding: 12px 25px;