Spaces:
Runtime error
Runtime error
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():
|