Spaces:
Sleeping
Sleeping
| import streamlit as st # type: ignore | |
| import pandas as pd | |
| import numpy as np | |
| st.set_page_config(page_title="Wine Dataset Analysis", layout="wide") | |
| #st.set_page_config(page_title="Wine Dataset Analysis", layout="wide") | |
| # Custom CSS for styling | |
| st.markdown(""" | |
| <style> | |
| .main { | |
| background-color: #f5f5f5; | |
| color: #000000; | |
| font-family: Arial, sans-serif; | |
| } | |
| .stApp { | |
| background-image: url('https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.kaggle.com%2Fdatasets%2Fuciml%2Fred-wine-quality-cortez-et-al-2009&psig=AOvVaw044WbrqWBv67EgvsMbhuHe&ust=1724990459183000&source=images&cd=vfe&opi=89978449&ved=0CBQQjRxqFwoTCMCd2NqnmYgDFQAAAAAdAAAAABAE'); | |
| background-size: cover; | |
| background-position: center; | |
| background-repeat: no-repeat; | |
| } | |
| .title { | |
| color: #ffffff; | |
| font-size: 50px; | |
| font-weight: bold; | |
| text-align: center; | |
| margin-top: 20px; | |
| } | |
| .subtitle { | |
| color: #ffffff; | |
| font-size: 20px; | |
| text-align: center; | |
| margin-bottom: 40px; | |
| } | |
| </style> | |
| """, unsafe_allow_html=True) | |
| # Background company name display | |
| st.markdown(f""" | |
| <div class="stApp"> | |
| <div class="title">Center for Analytics Services</div> | |
| <div class="subtitle">Association of Data Analysts and AI Professionals</div> | |
| </div> | |
| """, unsafe_allow_html=True) | |
| # App title | |
| st.title("Wine Dataset Analysis") | |
| # Number input for sample size | |
| st.header("Number Input: Set Sample Size") | |
| sample_size = st.number_input("Enter the number of samples to generate:", min_value=10, max_value=100, value=50) | |
| st.write(f"Sample Size: {sample_size}") | |
| # Sliders for feature selection | |
| st.header("Sliders: Set Feature Values") | |
| alcohol_level = st.slider("Alcohol Level", min_value=10.0, max_value=15.0, value=13.0, step=0.1) | |
| malic_acid = st.slider("Malic Acid", min_value=0.5, max_value=5.0, value=2.5, step=0.1) | |
| st.write(f"Selected Alcohol Level: {alcohol_level}") | |
| st.write(f"Selected Malic Acid Level: {malic_acid}") | |
| # Placeholder for dataset visualization (to be replaced with actual data later) | |
| st.header("Dataset Visualization (Placeholder)") | |
| data = pd.DataFrame({ | |
| 'Alcohol': np.random.normal(alcohol_level, 0.5, sample_size), | |
| 'Malic.acid': np.random.normal(malic_acid, 0.5, sample_size), | |
| 'Proline': np.random.randint(500, 1500, sample_size) | |
| }) | |
| st.write(data) | |
| # Line chart placeholder | |
| st.header("Line Chart (Placeholder)") | |
| st.line_chart(data[['Alcohol', 'Proline']]) | |
| # Custom footer with HTML and CSS | |
| st.markdown(""" | |
| <style> | |
| .footer { | |
| position: fixed; | |
| left: 0; | |
| bottom: 0; | |
| width: 100%; | |
| background-color: #4CAF50; | |
| color: white; | |
| text-align: center; | |
| padding: 10px; | |
| font-family: Arial, sans-serif; | |
| } | |
| </style> | |
| <div class="footer"> | |
| © 2024 Center for Analytics Services, Association of Data Analysts and AI Professionals | |
| </div> | |
| """, unsafe_allow_html=True) | |