eagle0504 commited on
Commit
ee27a37
β€’
1 Parent(s): 0496eda

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +32 -0
app.py ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import streamlit as st
3
+
4
+ # Hardcoded credentials
5
+ USERNAME = os.environ["USERNAME"]
6
+ PASSWORD = os.environ["PASSWORD"]
7
+
8
+ # Sidebar for login with emojis
9
+ st.sidebar.title("πŸ”’ AIXNet Login")
10
+ with st.sidebar.form(key='login_form'):
11
+ username = st.text_input("πŸ‘€ Username")
12
+ password = st.text_input("πŸ”‘ Password", type="password")
13
+ login_button = st.form_submit_button(label="πŸ”“ Login")
14
+
15
+ if login_button:
16
+ if username == USERNAME and password == PASSWORD:
17
+ st.sidebar.success("πŸŽ‰ Login successful!")
18
+
19
+ # Display table after successful login
20
+ st.title("πŸ“‹ AIXNet Tasks")
21
+ data = {
22
+ "πŸ“ Task": ["πŸ’» Code assist"],
23
+ "πŸ–₯️ Instance Type": ["t2.micro"],
24
+ "πŸ’° Price": ["$0.05 / hour"],
25
+ "🌐 IPv4": ["some_url_here"]
26
+ }
27
+
28
+ st.table(data)
29
+ else:
30
+ st.sidebar.error("❌ Invalid username or password. Please try again.")
31
+ else:
32
+ st.sidebar.info("πŸ‘‰ Please enter your credentials to log in.")