From 90cbc58c51b3d873e09b8cd8c1c938099e156d11 Mon Sep 17 00:00:00 2001 From: Hossein Raei Date: Tue, 3 Oct 2023 11:04:36 +0330 Subject: [PATCH] refactoring --- ...2\360\237\223\211_Statistical_analysis.py" | 0 ...3\360\237\223\210_Statistical_analysis.py" | 0 .../4\360\237\223\212_Further_analysis.py" | 0 .../pages/5\360\237\247\256_store.py" | 0 phase3 Dashboard/pages/extra.py | 52 ------------------- 5 files changed, 52 deletions(-) rename "phase3 Dashboard/pages/1\360\237\223\211_Statistical_analysis.py" => "phase3 Dashboard/pages/2\360\237\223\211_Statistical_analysis.py" (100%) rename "phase3 Dashboard/pages/2\360\237\223\210_Statistical_analysis.py" => "phase3 Dashboard/pages/3\360\237\223\210_Statistical_analysis.py" (100%) rename "phase3 Dashboard/pages/3\360\237\223\212_Further_analysis.py" => "phase3 Dashboard/pages/4\360\237\223\212_Further_analysis.py" (100%) rename "phase3 Dashboard/pages/4\360\237\247\256_store.py" => "phase3 Dashboard/pages/5\360\237\247\256_store.py" (100%) delete mode 100644 phase3 Dashboard/pages/extra.py diff --git "a/phase3 Dashboard/pages/1\360\237\223\211_Statistical_analysis.py" "b/phase3 Dashboard/pages/2\360\237\223\211_Statistical_analysis.py" similarity index 100% rename from "phase3 Dashboard/pages/1\360\237\223\211_Statistical_analysis.py" rename to "phase3 Dashboard/pages/2\360\237\223\211_Statistical_analysis.py" diff --git "a/phase3 Dashboard/pages/2\360\237\223\210_Statistical_analysis.py" "b/phase3 Dashboard/pages/3\360\237\223\210_Statistical_analysis.py" similarity index 100% rename from "phase3 Dashboard/pages/2\360\237\223\210_Statistical_analysis.py" rename to "phase3 Dashboard/pages/3\360\237\223\210_Statistical_analysis.py" diff --git "a/phase3 Dashboard/pages/3\360\237\223\212_Further_analysis.py" "b/phase3 Dashboard/pages/4\360\237\223\212_Further_analysis.py" similarity index 100% rename from "phase3 Dashboard/pages/3\360\237\223\212_Further_analysis.py" rename to "phase3 Dashboard/pages/4\360\237\223\212_Further_analysis.py" diff --git "a/phase3 Dashboard/pages/4\360\237\247\256_store.py" "b/phase3 Dashboard/pages/5\360\237\247\256_store.py" similarity index 100% rename from "phase3 Dashboard/pages/4\360\237\247\256_store.py" rename to "phase3 Dashboard/pages/5\360\237\247\256_store.py" diff --git a/phase3 Dashboard/pages/extra.py b/phase3 Dashboard/pages/extra.py deleted file mode 100644 index 5008741..0000000 --- a/phase3 Dashboard/pages/extra.py +++ /dev/null @@ -1,52 +0,0 @@ -import streamlit as st -from model import * -from matplotlib import pyplot as plt -import numpy as np -from wordcloud import WordCloud - -st.set_page_config(page_icon='☁️',page_title='wordCloud') -# st.title('📈 interactive_chart') -try: - mysqldb = get_connection() -except: - st.error("Make Sure Database is up & Running", icon="🚨") - st.stop() - -@st.cache_data -def prepare(): - book_summary_df=get_book_summary(mysqldb) - book_title_list=book_summary_df['Persian_title'].drop_duplicates().to_list() - return book_summary_df,book_title_list - - - -book_summary_df,book_title_list=prepare() -# Create some sample text -font_path = "C:\\Users\\Asus\\Downloads\\chocolatier_artisanal\\Chocolatier Artisanal.ttf" - -st.markdown("

☁️📗Book's word cloud

", unsafe_allow_html=True) -book_title= st.selectbox("Select a book", book_title_list) -if book_title is None: - st.write('select') -else: - book_summary=book_summary_df[book_summary_df['Persian_title']==book_title]['summary'] - wordcloud = WordCloud(width=800, height=400, background_color='white',font_path=font_path).generate(book_summary) - st.image(wordcloud.to_image()) - - -# st.markdown("

🎭actors netwrok graph

", unsafe_allow_html=True) -# df= worked_actors_togethar(mysqldb) - -# from pyvis.network import Network -# net = Network() -# actors1=list(df['actor1']) -# nodes=set(list(df['actor1'])+list(df['actor2'])) -# net.add_nodes(nodes) -# for index,row in df.iterrows(): -# net.add_edge(row['actor1'], row['actor2'], value=row['count'],title=row['count']) -# # net.show('network.html') -# with open("network.html", "r") as f: -# network_html = f.read() - -# # Display the network in Streamlit -# st.components.v1.html(network_html, width=800, height=600) \ No newline at end of file