-
Notifications
You must be signed in to change notification settings - Fork 0
/
Ishan-app-DV.py
47 lines (31 loc) · 1.27 KB
/
Ishan-app-DV.py
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
#header
import streamlit as st
import pandas as pd
import numpy as np
from plotly import express as px
import os
from matplotlib import image
# absolute path to this file
FILE_DIR = os.path.dirname(os.path.abspath(__file__))
# absolute path to this file's root directory
PARENT_DIR = os.path.join(FILE_DIR, os.pardir)
# absolute path of directory_of_interest
dir_of_interest = os.path.join(PARENT_DIR, "resource")
IMAGE_PATH = os.path.join(dir_of_interest, "image", "ghosts.jpg")
DATA_PATH= os.path.join(dir_of_interest, "dataset", "evilspirits.xlsx")
st.markdown("# Main page ")
st.sidebar.markdown("# Main page ")
st.title(":red[Evil Spirit Explorer: Know about your favourite buri aatma!]")
st.header(":green[Warning]: Dear faint hearted,please stay Away")
img = image.imread(IMAGE_PATH)
st.image(img)
st.markdown("# haunted page ")
st.sidebar.markdown("# haunted page ")
df = pd.read_excel(DATA_PATH)
st.dataframe(df)
type = st.selectbox("Select the buri aatma:", df['type'].unique())
col1, col2 = st.columns(2)
fig_1 = px.histogram(df[df['type'] == type], x="bone_length")
col1.plotly_chart(fig_1, use_container_width=True)
fig_2 = px.bar(df[df['type'] == type], y="rotting_flesh")
col2.plotly_chart(fig_2, use_container_width=True)