nishantguvvada's picture
Update app.py
6d51ff5 verified
raw
history blame
1.34 kB
import numpy as np
import pandas as pd
import streamlit as st
st.set_page_config(
page_title="Recommendation System for Agriculture",
page_icon=":random:",
layout="centered",
initial_sidebar_state="expanded",
menu_items={
'About': "# This application will help provide crop recommendations!"
}
)
#creating session states
create_session_state()
image = Image.open('./image/title.jpg')
st.image(image)
with st.sidebar:
image = Image.open('./image/sidebar_image.jpg')
st.image(image)
st.markdown("<h2 style='text-align: center; color: red;'>Settings Tab</h2>", unsafe_allow_html=True)
st.write("Model Settings:")
#define the temeperature for the model
temperature_value = st.slider('Temperature :', 0.0, 1.0, 0.2)
st.session_state['temperature'] = temperature_value
#define the temeperature for the model
token_limit_value = st.slider('Token limit :', 1, 1024, 256)
st.session_state['token_limit'] = token_limit_value
#define the temeperature for the model
top_k_value = st.slider('Top-K :', 1,40,40)
st.session_state['top_k'] = top_k_value
#define the temeperature for the model
top_p_value = st.slider('Top-P :', 0.0, 1.0, 0.8)
st.session_state['top_p'] = top_p_value
if st.button("Reset Session"):
reset_session()