Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
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)
|