Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import streamlit.components.v1 as components # Import Streamlit
|
3 |
+
|
4 |
+
from logic import get_index,get_network_graph,get_embeddings,get_visualize_embeddings
|
5 |
+
|
6 |
+
text = st.text_input("Input Links Seperated by ','")
|
7 |
+
links = text.split(",")
|
8 |
+
|
9 |
+
index = get_index(links)
|
10 |
+
get_network_graph(index)
|
11 |
+
emb = get_embeddings(index)
|
12 |
+
fig = get_visualize_embeddings(emb)
|
13 |
+
|
14 |
+
# Plotly Chart
|
15 |
+
st.plotly_chart(fig, use_container_width=True)
|
16 |
+
|
17 |
+
# Render the h1 block, contained in a frame of size 200x200.
|
18 |
+
HtmlFile = open("kuzugraph_draw3.html", 'r', encoding='utf-8')
|
19 |
+
source_code = HtmlFile.read()
|
20 |
+
components.html(source_code)
|