Polo123's picture
Create app.py
2b8f617 verified
raw
history blame
615 Bytes
import streamlit as st
import streamlit.components.v1 as components # Import Streamlit
from logic import get_index,get_network_graph,get_embeddings,get_visualize_embeddings
text = st.text_input("Input Links Seperated by ','")
links = text.split(",")
index = get_index(links)
get_network_graph(index)
emb = get_embeddings(index)
fig = get_visualize_embeddings(emb)
# Plotly Chart
st.plotly_chart(fig, use_container_width=True)
# Render the h1 block, contained in a frame of size 200x200.
HtmlFile = open("kuzugraph_draw3.html", 'r', encoding='utf-8')
source_code = HtmlFile.read()
components.html(source_code)