File size: 1,302 Bytes
7d9087b
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import streamlit as st

def render_sidebar():
    st.sidebar.title("DocChatAI")
    st.sidebar.subheader("Chat using PDF Document")
    st.sidebar.write("-----------")
    
    # Model Selection
    model_options = ["deepseek-r1:1.5b"]
    selected_model = st.sidebar.radio("Choose Model", model_options)
    
    st.sidebar.write("-----------")
    
    # Hyperparameters
    temperature = st.sidebar.slider("Temperature", min_value=0.0, max_value=1.0, value=0.7, step=0.1)
    top_p = st.sidebar.slider("Top-p (Nucleus Sampling)", min_value=0.0, max_value=1.0, value=0.9, step=0.05)
    max_tokens = st.sidebar.number_input("Max Tokens", min_value=10, max_value=2048, value=256, step=10)
    
    st.sidebar.write("-----------")
    
    # File Upload
    uploaded_file = st.sidebar.file_uploader("Upload Documents", type=["pdf"])
    
    st.sidebar.write("-----------")
    
    # About Section
    st.sidebar.write("About Me")
    st.sidebar.write("Name: Deepak Yadav")
    st.sidebar.write("Bio: Passionate about AI and machine learning.")
    st.sidebar.write("[GitHub](https://github.com/deepak7376)")
    st.sidebar.write("[LinkedIn](https://www.linkedin.com/in/dky7376/)")
    
    st.sidebar.write("-----------")
    
    return selected_model, temperature, top_p, max_tokens, uploaded_file