Spaces:
Sleeping
Sleeping
File size: 2,987 Bytes
8f2dbfa 82823a2 8f2dbfa 8cf2955 8f2dbfa |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
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)
|