ai-x-net / app.py
eagle0504's picture
Create app.py
ee27a37 verified
raw
history blame
1.03 kB
import os
import streamlit as st
# Hardcoded credentials
USERNAME = os.environ["USERNAME"]
PASSWORD = os.environ["PASSWORD"]
# Sidebar for login with emojis
st.sidebar.title("πŸ”’ AIXNet Login")
with st.sidebar.form(key='login_form'):
username = st.text_input("πŸ‘€ Username")
password = st.text_input("πŸ”‘ Password", type="password")
login_button = st.form_submit_button(label="πŸ”“ Login")
if login_button:
if username == USERNAME and password == PASSWORD:
st.sidebar.success("πŸŽ‰ Login successful!")
# Display table after successful login
st.title("πŸ“‹ AIXNet Tasks")
data = {
"πŸ“ Task": ["πŸ’» Code assist"],
"πŸ–₯️ Instance Type": ["t2.micro"],
"πŸ’° Price": ["$0.05 / hour"],
"🌐 IPv4": ["some_url_here"]
}
st.table(data)
else:
st.sidebar.error("❌ Invalid username or password. Please try again.")
else:
st.sidebar.info("πŸ‘‰ Please enter your credentials to log in.")