File size: 606 Bytes
a9a8feb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import streamlit as st
from tensorflow.keras.models import load_model
import numpy as np

model=load_model("model.h5")

st.title("Learn Yield of Wild Blueberries")

y=st.number_input("Yield")
f=st.number_input("Fruitset")
s=st.number_input("Seeds")
fm=st.number_input("Fruitmass")
ard=st.number_input("Average Raining Days")
rd=st.number_input("Raining Days")
c=st.number_input("Clonesize")
data=[y,f,s,fm,ard,rd,c]
if st.button("Predict"):
    data=np.array(data)
    if len(data.shape) == 1:
       data = np.expand_dims(data, axis=0) 
    pred=model.predict(data)
    st.write(pred)