File size: 1,390 Bytes
5507d79 fa01a43 0dc3ba4 fa01a43 0dc3ba4 fa01a43 0dc3ba4 fa01a43 0dc3ba4 fa01a43 0dc3ba4 fa01a43 0dc3ba4 fa01a43 0dc3ba4 fa01a43 5507d79 0bbf9ea 6854042 0bbf9ea fa01a43 0bbf9ea d5a9da1 0bbf9ea 48f8b23 0bbf9ea 742752c c3e4f19 0bbf9ea c3e4f19 fa01a43 d17cea4 fa01a43 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
import streamlit as st
from logic2 import *
import streamlit.components.v1 as components
st.title('PyG - Movie Recommendation')
st.image('Image_graph.png', caption='Bi-Partite Graph')
st.write('Scatter Plot of embeddings')
HtmlFile = open("plot.html", 'r', encoding='utf-8')
source_code = HtmlFile.read()
components.html(source_code)
# load Hgraph
st.write('Loading Data')
data = load_hetero_data()
# Load Model
st.write('Loading Model')
model = load_model(data)
#get user_id
user_id = st.number_input('Give User-Id')
# get recommendation
ans = get_recommendation(model,data,user_id)
st.write(ans)
#---------------------
'''
st.write('Making Graph')
global movie_mappings, user_mapping, ratings_df, m_id, id_map, sampled_md
movie_mappings, user_mapping, ratings_df, m_id, id_map, sampled_md = make_graph()
st.write('Login to ArangoDB')
login,url,username,password,dbname = login_ArangoDB()
st.write(url)
st.write(username)
st.write(password)
st.write(dbname)
st.write('Loading Graph to ArangoDB')
movie_rec_db = load_data_to_ArangoDB(login)
st.write('Making PyG graph from ArangoDB')
global data
data,train_data, val_data, test_data = make_pyg_graph(movie_rec_db)
st.write('training graph')
model = load_model(train_data, val_data, test_data)
user_id = st.number_input('Insert a number')
ans = get_recommendation(model,data,user_id)
st.write(ans)
'''
#---------------------
|