RICHARDMENSAH commited on
Commit
8f2dbfa
·
verified ·
1 Parent(s): 8b1884b

Create wineapp

Browse files
Files changed (1) hide show
  1. wineapp +93 -0
wineapp ADDED
@@ -0,0 +1,93 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st # type: ignore
2
+ import pandas as pd
3
+ import numpy as np
4
+
5
+ Set page config
6
+ st.set_page_config(page_title="Wine Dataset Analysis", layout="wide")
7
+ #st.set_page_config(page_title="Wine Dataset Analysis", layout="wide")
8
+
9
+ # Custom CSS for styling
10
+ st.markdown("""
11
+ <style>
12
+ .main {
13
+ background-color: #f5f5f5;
14
+ color: #000000;
15
+ font-family: Arial, sans-serif;
16
+ }
17
+ .stApp {
18
+ background-image: url('https://your-background-image-url-here');
19
+ background-size: cover;
20
+ background-position: center;
21
+ background-repeat: no-repeat;
22
+ }
23
+ .title {
24
+ color: #ffffff;
25
+ font-size: 50px;
26
+ font-weight: bold;
27
+ text-align: center;
28
+ margin-top: 20px;
29
+ }
30
+ .subtitle {
31
+ color: #ffffff;
32
+ font-size: 20px;
33
+ text-align: center;
34
+ margin-bottom: 40px;
35
+ }
36
+ </style>
37
+ """, unsafe_allow_html=True)
38
+
39
+ # Background company name display
40
+ st.markdown(f"""
41
+ <div class="stApp">
42
+ <div class="title">Center for Analytics Services</div>
43
+ <div class="subtitle">Association of Data Analysts and AI Professionals</div>
44
+ </div>
45
+ """, unsafe_allow_html=True)
46
+
47
+ # App title
48
+ st.title("Wine Dataset Analysis")
49
+
50
+ # Number input for sample size
51
+ st.header("Number Input: Set Sample Size")
52
+ sample_size = st.number_input("Enter the number of samples to generate:", min_value=10, max_value=100, value=50)
53
+ st.write(f"Sample Size: {sample_size}")
54
+
55
+ # Sliders for feature selection
56
+ st.header("Sliders: Set Feature Values")
57
+ alcohol_level = st.slider("Alcohol Level", min_value=10.0, max_value=15.0, value=13.0, step=0.1)
58
+ malic_acid = st.slider("Malic Acid", min_value=0.5, max_value=5.0, value=2.5, step=0.1)
59
+ st.write(f"Selected Alcohol Level: {alcohol_level}")
60
+ st.write(f"Selected Malic Acid Level: {malic_acid}")
61
+
62
+ # Placeholder for dataset visualization (to be replaced with actual data later)
63
+ st.header("Dataset Visualization (Placeholder)")
64
+ data = pd.DataFrame({
65
+ 'Alcohol': np.random.normal(alcohol_level, 0.5, sample_size),
66
+ 'Malic.acid': np.random.normal(malic_acid, 0.5, sample_size),
67
+ 'Proline': np.random.randint(500, 1500, sample_size)
68
+ })
69
+ st.write(data)
70
+
71
+ # Line chart placeholder
72
+ st.header("Line Chart (Placeholder)")
73
+ st.line_chart(data[['Alcohol', 'Proline']])
74
+
75
+ # Custom footer with HTML and CSS
76
+ st.markdown("""
77
+ <style>
78
+ .footer {
79
+ position: fixed;
80
+ left: 0;
81
+ bottom: 0;
82
+ width: 100%;
83
+ background-color: #4CAF50;
84
+ color: white;
85
+ text-align: center;
86
+ padding: 10px;
87
+ font-family: Arial, sans-serif;
88
+ }
89
+ </style>
90
+ <div class="footer">
91
+ © 2024 Center for Analytics Services, Association of Data Analysts and AI Professionals
92
+ </div>
93
+ """, unsafe_allow_html=True)