Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -204,15 +204,13 @@ def search_glossary(query):
|
|
204 |
filename = generate_filename(query + ' --- ' + response, "md")
|
205 |
create_file(filename, query, response, should_save)
|
206 |
|
207 |
-
st.write('## π Running with Llama.') # -------------------------------------------------------------------------------------------------
|
208 |
-
response2 = StreamLLMChatResponse(query)
|
209 |
#st.write(response2)
|
210 |
-
|
211 |
-
filename_txt
|
212 |
-
|
213 |
-
|
214 |
-
all = '# Query: ' + query + '# Response: ' + response + '# Response2: ' + response2
|
215 |
-
|
216 |
filename_txt2 = generate_filename(query + ' --- ' + all, "md")
|
217 |
create_file(filename_txt2, query, all, should_save)
|
218 |
|
@@ -1026,49 +1024,6 @@ def add_medical_exam_buttons():
|
|
1026 |
filename = generate_filename(response, 'txt')
|
1027 |
create_file(filename, input, response, should_save)
|
1028 |
|
1029 |
-
def add_medical_exam_buttons2():
|
1030 |
-
with st.expander("Medical Licensing Exam Topics π", expanded=False):
|
1031 |
-
st.markdown("π©Ί **Important**: This section provides a variety of medical topics that are often encountered in medical licensing exams.")
|
1032 |
-
|
1033 |
-
# Define medical exam terminology descriptions
|
1034 |
-
descriptions = {
|
1035 |
-
"White Blood Cells π": "3 Questions and Answers with emojis about white blood cells π₯",
|
1036 |
-
"CT Imagingπ¦ ": "3 Questions and Answers with emojis about CT Imaging of post surgery abscess, hematoma, and cerosanguiness fluid π",
|
1037 |
-
"Hematoma π": "3 Questions and Answers with emojis about hematoma and infection and how heat helps white blood cells πͺ",
|
1038 |
-
"Post Surgery Wound Care π": "3 Questions and Answers with emojis about wound care and how to help as a caregiverπ©Έ",
|
1039 |
-
"Healing and humor π": "3 Questions and Answers with emojis on the use of stories and humor to help patients and family π",
|
1040 |
-
"Psychology of bedside manner π§¬": "3 Questions and Answers with emojis about good bedside manner π ",
|
1041 |
-
"CT scan π": "3 Questions and Answers with analysis of bacteria and understanding infection using cultures and CT scan π©Ί"
|
1042 |
-
}
|
1043 |
-
|
1044 |
-
# Create columns
|
1045 |
-
col1, col2, col3, col4 = st.columns([1, 1, 1, 1], gap="small")
|
1046 |
-
|
1047 |
-
# Add buttons to columns
|
1048 |
-
if col1.button("Ultrasound with Doppler π"):
|
1049 |
-
StreamLLMChatResponse(descriptions["Ultrasound with Doppler π"])
|
1050 |
-
|
1051 |
-
if col2.button("Oseltamivir π¦ "):
|
1052 |
-
StreamLLMChatResponse(descriptions["Oseltamivir π¦ "])
|
1053 |
-
|
1054 |
-
if col3.button("IM Epinephrine π"):
|
1055 |
-
StreamLLMChatResponse(descriptions["IM Epinephrine π"])
|
1056 |
-
|
1057 |
-
if col4.button("Hypokalemia π"):
|
1058 |
-
StreamLLMChatResponse(descriptions["Hypokalemia π"])
|
1059 |
-
|
1060 |
-
col5, col6, col7, col8 = st.columns([1, 1, 1, 1], gap="small")
|
1061 |
-
|
1062 |
-
if col5.button("Succinylcholine π"):
|
1063 |
-
StreamLLMChatResponse(descriptions["Succinylcholine π"])
|
1064 |
-
|
1065 |
-
if col6.button("Phosphoinositol System π§¬"):
|
1066 |
-
StreamLLMChatResponse(descriptions["Phosphoinositol System π§¬"])
|
1067 |
-
|
1068 |
-
if col7.button("Ramipril π"):
|
1069 |
-
StreamLLMChatResponse(descriptions["Ramipril π"])
|
1070 |
-
|
1071 |
-
|
1072 |
|
1073 |
# 17. Main
|
1074 |
def main():
|
|
|
204 |
filename = generate_filename(query + ' --- ' + response, "md")
|
205 |
create_file(filename, query, response, should_save)
|
206 |
|
207 |
+
#st.write('## π Running with Llama.') # -------------------------------------------------------------------------------------------------
|
208 |
+
#response2 = StreamLLMChatResponse(query)
|
209 |
#st.write(response2)
|
210 |
+
#filename_txt = generate_filename(query + ' --- ' + response2, "md")
|
211 |
+
#create_file(filename_txt, query, response2, should_save)
|
212 |
+
|
213 |
+
all = '# Query: ' + query + '# Response: ' + response
|
|
|
|
|
214 |
filename_txt2 = generate_filename(query + ' --- ' + all, "md")
|
215 |
create_file(filename_txt2, query, all, should_save)
|
216 |
|
|
|
1024 |
filename = generate_filename(response, 'txt')
|
1025 |
create_file(filename, input, response, should_save)
|
1026 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1027 |
|
1028 |
# 17. Main
|
1029 |
def main():
|