Building the menu and adding decorations
Now, we can add a selectbox in the sidebar, which will be the menu of the web application, and guidelines for its development. This menu will have three voices – Image Enhance, Diagnosis, and Disclaimer and Info – and it will be placed below the second if
clause, the inner one, because it makes sense only if a valid image has already been uploaded. For sure, after the selectbox, we can place the three options (three if
clauses) that will contain the code for each one of the menu voices.
We have already built up a menu in the same way in the NLP web application; the code is very easy:
Figure 8.11: The menu (choice) and its voice sections
Here’s what we are doing:
- At line 38, we create a list containing all the menu voices
- Then, at line 39, we add a selectbox in the sidebar in order to visualize all the items contained in this list.
- After that, from line 41 up to line 48, we...