Syauqi Nabil Tasri commited on
Commit
2d3efa8
·
verified ·
1 Parent(s): 38328fc

Upload 4 files

Browse files
Files changed (4) hide show
  1. Almond.csv +0 -0
  2. app.py +35 -0
  3. model.pkl +3 -0
  4. requirements.txt +6 -0
Almond.csv ADDED
The diff for this file is too large to render. See raw diff
 
app.py ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import streamlit as st
2
+ import pandas as pd
3
+ import pickle
4
+
5
+ model = pickle.load(open('C:\\dasprog well\\fp_ise\\model.pkl', 'rb'))
6
+
7
+ # Replace 'your_model_name' with the name you want for your model
8
+ repo_url = create_repo(name='Almond Classification', private=False)
9
+
10
+ st.title('Almond Classification')
11
+ st.write('This web app classifies almonds based on your input features.')
12
+
13
+
14
+ # Input untuk setiap fitur
15
+ length_major_axis = st.number_input('Length (major axis)', min_value=0.0)
16
+ width_minor_axis = st.number_input('Width (minor axis)', min_value=0.0)
17
+ thickness_depth = st.number_input('Thickness (depth)', min_value=0.0)
18
+ area = st.number_input('Area', min_value=0.0)
19
+ perimeter = st.number_input('Perimeter', min_value=0.0)
20
+ roundness = st.slider('Roundness', min_value=0.0, max_value=1.0, step=0.01)
21
+ solidity = st.slider('Solidity', min_value=0.0, max_value=1.0, step=0.01)
22
+ compactness = st.slider('Compactness', min_value=0.0, max_value=1.0, step=0.01)
23
+ aspect_ratio = st.slider('Aspect Ratio', min_value=0.0, max_value=5.0, step=0.01)
24
+ eccentricity = st.slider('Eccentricity', min_value=0.0, max_value=1.0, step=0.01)
25
+ extent = st.slider('Extent', min_value=0.0, max_value=1.0, step=0.01)
26
+ convex_area = st.number_input('Convex hull (convex area)', min_value=0.0, step=0.01)
27
+
28
+
29
+ # Tombol untuk memprediksi
30
+ if st.button('Predict'):
31
+ input_features = [[length_major_axis, width_minor_axis, thickness_depth, area,
32
+ perimeter, roundness, solidity, compactness, aspect_ratio,
33
+ eccentricity, extent, convex_area]]
34
+ prediction = model.predict(input_features)
35
+ st.write(f'The predicted class is: {prediction[0]}')
model.pkl ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:42efa29ecddf7b1302f818f15f6041c5ddec94949e11a7ce19716ee367486bf1
3
+ size 241
requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ pandas
2
+ streamlit
3
+ pickle
4
+ numpy
5
+ seaborn
6
+ matplotlib