Update app.py
Browse files
app.py
CHANGED
@@ -14,7 +14,7 @@ load_dotenv()
|
|
14 |
# Hyperparameters
|
15 |
PDF_CHUNK_SIZE = 1024
|
16 |
PDF_CHUNK_OVERLAP = 256
|
17 |
-
k =
|
18 |
|
19 |
# Load favicon image
|
20 |
def load_and_pad_image(image_path, size=(64, 64)):
|
@@ -42,10 +42,10 @@ with col2:
|
|
42 |
)
|
43 |
|
44 |
# Model and Embedding Selection
|
45 |
-
model_options = ["gpt-4o", "gpt-4o-mini"
|
46 |
selected_model = st.selectbox("Choose a GPT model", model_options)
|
47 |
|
48 |
-
embedding_model_options = ["OpenAI"
|
49 |
selected_embedding_model = st.selectbox("Choose an Embedding model", embedding_model_options)
|
50 |
|
51 |
# Load the model
|
@@ -97,7 +97,7 @@ def main():
|
|
97 |
)
|
98 |
|
99 |
system_prompt = """
|
100 |
-
You are a friendly and knowledgeable assistant who is an expert in medical education who will only answer from the context provided.
|
101 |
"""
|
102 |
|
103 |
template = f"""
|
|
|
14 |
# Hyperparameters
|
15 |
PDF_CHUNK_SIZE = 1024
|
16 |
PDF_CHUNK_OVERLAP = 256
|
17 |
+
k = 9
|
18 |
|
19 |
# Load favicon image
|
20 |
def load_and_pad_image(image_path, size=(64, 64)):
|
|
|
42 |
)
|
43 |
|
44 |
# Model and Embedding Selection
|
45 |
+
model_options = ["gpt-4o", "gpt-4o-mini"] #, "deepseek-chat"
|
46 |
selected_model = st.selectbox("Choose a GPT model", model_options)
|
47 |
|
48 |
+
embedding_model_options = ["OpenAI"] #, "Huggingface MedEmbed"
|
49 |
selected_embedding_model = st.selectbox("Choose an Embedding model", embedding_model_options)
|
50 |
|
51 |
# Load the model
|
|
|
97 |
)
|
98 |
|
99 |
system_prompt = """
|
100 |
+
You are a friendly and knowledgeable assistant who is an expert in medical education who will only answer from the context provided. You need to understand the best context to answer the question.
|
101 |
"""
|
102 |
|
103 |
template = f"""
|