TpsNandhini commited on
Commit
4981204
β€’
1 Parent(s): 3dc462d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -8
app.py CHANGED
@@ -7,7 +7,7 @@ import pytz
7
  import numpy as np
8
  import pandas as pd
9
  import plotly.express as px
10
- import plotly.graph_objs as go # Import Plotly's graph objects
11
 
12
  # MySQL Connection
13
  connection = mysql.connector.connect(
@@ -24,11 +24,11 @@ mycursor.execute('USE PerformancePrediction')
24
 
25
  mycursor.execute('''CREATE TABLE IF NOT EXISTS User_data
26
  (id INT AUTO_INCREMENT PRIMARY KEY,
27
- username VARCHAR(50) UNIQUE NOT NULL,
28
- password VARCHAR(255) NOT NULL,
29
- email VARCHAR(255) UNIQUE NOT NULL,
30
- registered_date TIMESTAMP,
31
- last_login TIMESTAMP)''')
32
 
33
  def username_exists(username):
34
  mycursor.execute("SELECT * FROM User_data WHERE username = %s", (username,))
@@ -138,7 +138,6 @@ st.markdown("""
138
 
139
  # Login page
140
  def login():
141
- st.image("performance_nexus_logo.png", use_column_width=True)
142
  st.markdown('<p class="big-font">Performance Nexus 🎯</p>', unsafe_allow_html=True)
143
 
144
  col1, col2, col3 = st.columns([1, 2, 1])
@@ -242,7 +241,7 @@ def reset_password_page():
242
 
243
  # Home page
244
  def home_page():
245
- st.markdown('<p class="big-font">Welcome to the Performance Nexus Dashboard, {st.session_state.username}!</p>', unsafe_allow_html=True)
246
 
247
  st.image("homepageimage.png", use_column_width=True)
248
  st.markdown("<hr>", unsafe_allow_html=True)
 
7
  import numpy as np
8
  import pandas as pd
9
  import plotly.express as px
10
+ import plotly.graph_objs as go
11
 
12
  # MySQL Connection
13
  connection = mysql.connector.connect(
 
24
 
25
  mycursor.execute('''CREATE TABLE IF NOT EXISTS User_data
26
  (id INT AUTO_INCREMENT PRIMARY KEY,
27
+ username VARCHAR(50) UNIQUE NOT NULL,
28
+ password VARCHAR(255) NOT NULL,
29
+ email VARCHAR(255) UNIQUE NOT NULL,
30
+ registered_date TIMESTAMP,
31
+ last_login TIMESTAMP)''')
32
 
33
  def username_exists(username):
34
  mycursor.execute("SELECT * FROM User_data WHERE username = %s", (username,))
 
138
 
139
  # Login page
140
  def login():
 
141
  st.markdown('<p class="big-font">Performance Nexus 🎯</p>', unsafe_allow_html=True)
142
 
143
  col1, col2, col3 = st.columns([1, 2, 1])
 
241
 
242
  # Home page
243
  def home_page():
244
+ st.markdown(f'<p class="big-font">Welcome to the Performance Nexus Dashboard, {st.session_state.username}!</p>', unsafe_allow_html=True)
245
 
246
  st.image("homepageimage.png", use_column_width=True)
247
  st.markdown("<hr>", unsafe_allow_html=True)