Polo123 commited on
Commit
2878a9e
1 Parent(s): 74cb18d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -5
app.py CHANGED
@@ -11,11 +11,15 @@ if (token != '' and KG_name != ""):
11
  if(os.path.exists(KG_name)):
12
  index = load_index(token,KG_name)
13
  else:
14
- text = st.text_input("Input Links Seperated by ','")
15
- if(text != ""):
16
- links = text.split(",")
17
- index = get_index(links,token,KG_name)
18
-
 
 
 
 
19
  get_network_graph(index)
20
  emb = get_embeddings(index)
21
  fig = get_visualize_embeddings(emb)
 
11
  if(os.path.exists(KG_name)):
12
  index = load_index(token,KG_name)
13
  else:
14
+ with st.form("links_form"):
15
+ text = st.text_input("Input Links Seperated by ','")
16
+
17
+ submitted = st.form_submit_button("Submit")
18
+ if submitted:
19
+ links = text.split(",")
20
+ index = get_index(links,token,KG_name)
21
+
22
+
23
  get_network_graph(index)
24
  emb = get_embeddings(index)
25
  fig = get_visualize_embeddings(emb)