ugmSorcero commited on
Commit
0a35ae0
1 Parent(s): 0216d90

Navigation prettier

Browse files
Files changed (2) hide show
  1. app.py +9 -2
  2. interface/pages.py +6 -3
app.py CHANGED
@@ -29,11 +29,18 @@ def run_demo():
29
  with navigation:
30
 
31
  selected_page = option_menu(
32
- "Navigation",
33
- list(pages.keys()),
34
  icons=[f[1] for f in pages.values()],
35
  menu_icon="cast",
36
  default_index=0,
 
 
 
 
 
 
 
37
  )
38
  component_select_pipeline(navigation)
39
 
 
29
  with navigation:
30
 
31
  selected_page = option_menu(
32
+ menu_title="Navigation",
33
+ options=list(pages.keys()),
34
  icons=[f[1] for f in pages.values()],
35
  menu_icon="cast",
36
  default_index=0,
37
+ styles={
38
+ "container": {"border": "2px solid #818494"},
39
+ "icon": {"font-size": "22px"},
40
+ # "nav-item": {},
41
+ "nav-link": {"font-size": "20px", "text-align": "left"},
42
+ # "nav-link-selected": {"background-color": "green"},
43
+ }
44
  )
45
  component_select_pipeline(navigation)
46
 
interface/pages.py CHANGED
@@ -17,6 +17,9 @@ def page_landing_page(container):
17
  st.markdown(
18
  "This is a tool to allow indexing & search content using neural capabilities"
19
  )
 
 
 
20
  st.markdown(
21
  "In this second version you can:"
22
  "\n - Index raw text, URLs and almost any file as documents"
@@ -62,11 +65,11 @@ def page_index(container):
62
 
63
  input_funcs = {
64
  "Raw Text": (component_text_input, "card-text"),
65
- "URL": (component_article_url, "card-link"),
66
- "File": (component_file_input, "card-file"),
67
  }
68
  selected_input = option_menu(
69
- "Input Text",
70
  list(input_funcs.keys()),
71
  icons=[f[1] for f in input_funcs.values()],
72
  menu_icon="list",
 
17
  st.markdown(
18
  "This is a tool to allow indexing & search content using neural capabilities"
19
  )
20
+ st.markdown(
21
+ "It uses the [Haystack](https://haystack.deepset.ai/overview/intro) open-source framework for building search systems"
22
+ )
23
  st.markdown(
24
  "In this second version you can:"
25
  "\n - Index raw text, URLs and almost any file as documents"
 
65
 
66
  input_funcs = {
67
  "Raw Text": (component_text_input, "card-text"),
68
+ "URL": (component_article_url, "link"),
69
+ "File": (component_file_input, "file-text"),
70
  }
71
  selected_input = option_menu(
72
+ None,
73
  list(input_funcs.keys()),
74
  icons=[f[1] for f in input_funcs.values()],
75
  menu_icon="list",