image not appearing
getting below error
# Importing Libraries
import pandas as pd
import mysql.connector as sql
import streamlit as st
import plotly.express as px
import os
import json
from streamlit_option_menu import option_menu
from PIL import Image
from git.repo.base import Repo
# Setting up page configuration
icon = Image.open("C:/Users/HP/PycharmProjects/phonepe/ICN.png")
st.set_page_config(page_title="Phonepe Pulse Data Visualization | By Jafar Hussain",
page_icon=icon,
layout="wide",
initial_sidebar_state="expanded",
menu_items={'About': """# This dashboard app is created by *Jafar Hussain*!
Data has been cloned from Phonepe Pulse Github Repo"""})
st.sidebar.header(":wave: :violet[**Hello! Welcome to the dashboard**]")
# #To clone the Github Pulse repository use the following code
# Reference Syntax - Repo.clone_from("Clone Url", "Your working directory")
# Repo.clone_from("https://github.com/PhonePe/pulse.git", "Project_3_PhonepePulse/Phonepe_data/data")
# Creating connection with mysql workbench
mydb = sql.connect(host="localhost",
user="root",
password="12345",
database= "phonepe_pulse"
)
mycursor = mydb.cursor(buffered=True)
with st.sidebar:
selected = option_menu("Menu", ["Home", "Top Charts", "Explore Data", "About"],
icons=["house", "graph-up-arrow", "bar-chart-line", "exclamation-circle"],
menu_icon="menu-button-wide",
default_index=0,
styles={"nav-link": {"font-size": "20px", "text-align": "left", "margin": "-2px",
"--hover-color": "#6F36AD"},
"nav-link-selected": {"background-color": "#6F36AD"}})
# MENU 1 - HOME
if selected == "Home":
st.image("C:/Users/HP/PycharmProjects/phonepe/PhonePe_Pulse.jpg")
st.markdown("# :violet[Data Visualization and Exploration]")
st.markdown("## :violet[A User-Friendly Tool Using Streamlit and Plotly]")
col1, col2 = st.columns([3, 2], gap="medium")
with col1:
st.write(" ")
st.write(" ")
st.markdown("### :violet[Domain :] Fintech")
st.markdown(
"### :violet[Technologies used :] Github Cloning, Python, Pandas, MySQL, mysql-connector-python, Streamlit, and Plotly.")
st.markdown(
"### :violet[Overview :] In this streamlit web app you can visualize the phonepe pulse data and gain lot of insights on transactions, number of users, top 10 state, district, pincode and which brand has most number of users and so on. Bar charts, Pie charts and Geo map visualization are used to get some insights.")
with col2:
st.image("C:/Users/HP/PycharmProjects/phonepe/PhonePe_Pulse.jpg")
If applicable, please provide the steps we should take to reproduce the error or specified behavior.
Expected behavior:
Explain what you expect to happen when you run the code above.
Actual behavior:
Explain the undesired behavior or error you see when you run the code above.
If youāre seeing an error message, share the full contents of the error message here.
Debug info
- Streamlit version: (get it with
$ streamlit version
) - Python version: (get it with
$ python --version
) - Using Conda? PipEnv? PyEnv? Pex?
- OS version:
- Browser version:
Requirements file
Using Conda? PipEnv? PyEnv? Pex? Share the contents of your requirements file here.
Not sure what a requirements file is? Check out this doc and add a requirements file to your app.
Links
- Link to your GitHub repo:
- Link to your deployed app:
Additional information
If needed, add any other context about the problem here.