khaerens commited on
Commit
af1593d
1 Parent(s): 68a0312
Files changed (1) hide show
  1. app.py +11 -1
app.py CHANGED
@@ -27,6 +27,9 @@ free_text_state_variables = {
27
  }
28
 
29
  def wiki_init_state_variables():
 
 
 
30
  for k, v in wiki_state_variables.items():
31
  if k not in st.session_state:
32
  st.session_state[k] = v
@@ -103,6 +106,13 @@ def free_text_layout():
103
  st.text_input("Free text", key="free_text")
104
  st.button("Generate", on_click=free_text_generate, key="free_text_generate")
105
 
 
 
 
 
 
 
 
106
 
107
  st.title('REBELious knowledge graph generation')
108
  st.selectbox(
@@ -115,7 +125,7 @@ def show_wiki_hub_page():
115
  """
116
  # how to
117
  - Enter wikipedia search terms, separated by comma's
118
- - Choose one or more of the suggested pages
119
  - Click generate!
120
  """
121
  )
 
27
  }
28
 
29
  def wiki_init_state_variables():
30
+ for k in free_text_state_variables.keys():
31
+ del st.session_state[k]
32
+
33
  for k, v in wiki_state_variables.items():
34
  if k not in st.session_state:
35
  st.session_state[k] = v
 
106
  st.text_input("Free text", key="free_text")
107
  st.button("Generate", on_click=free_text_generate, key="free_text_generate")
108
 
109
+ def free_test_init_state_variables():
110
+ for k in wiki_state_variables.keys():
111
+ del st.session_state[k]
112
+
113
+ for k, v in free_text_state_variables.items():
114
+ if k not in st.session_state:
115
+ st.session_state[k] = v
116
 
117
  st.title('REBELious knowledge graph generation')
118
  st.selectbox(
 
125
  """
126
  # how to
127
  - Enter wikipedia search terms, separated by comma's
128
+ - Choose one or more of the suggested pages (max 5)
129
  - Click generate!
130
  """
131
  )