Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -571,6 +571,60 @@ def whisper_main():
|
|
| 571 |
#st.sidebar.markdown(get_table_download_link(filename), unsafe_allow_html=True)
|
| 572 |
|
| 573 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 574 |
# 17. Main
|
| 575 |
def main():
|
| 576 |
|
|
@@ -578,7 +632,8 @@ def main():
|
|
| 578 |
prompt = f"Write ten funny jokes that are tweet length stories that make you laugh. Show as markdown outline with emojis for each."
|
| 579 |
|
| 580 |
# Add Wit and Humor buttons
|
| 581 |
-
add_witty_humor_buttons()
|
|
|
|
| 582 |
|
| 583 |
example_input = st.text_input("Enter your example text:", value=prompt, help="Enter text to get a response from DromeLlama.")
|
| 584 |
if st.button("Run Prompt With DromeLlama", help="Click to run the prompt."):
|
|
|
|
| 571 |
#st.sidebar.markdown(get_table_download_link(filename), unsafe_allow_html=True)
|
| 572 |
|
| 573 |
|
| 574 |
+
import streamlit as st
|
| 575 |
+
|
| 576 |
+
# Sample function to demonstrate a response, replace with your own logic
|
| 577 |
+
def StreamMedChatResponse(topic):
|
| 578 |
+
st.write(f"Showing resources or questions related to: {topic}")
|
| 579 |
+
|
| 580 |
+
def add_medical_exam_buttons():
|
| 581 |
+
with st.expander("Medical Licensing Exam Topics π", expanded=True):
|
| 582 |
+
st.markdown("π©Ί **Important**: This section provides a variety of medical topics that are often encountered in medical licensing exams.")
|
| 583 |
+
|
| 584 |
+
# Define medical exam terminology descriptions
|
| 585 |
+
descriptions = {
|
| 586 |
+
"Ultrasound with Doppler π": "Questions related to Doppler Ultrasound imaging techniques π₯",
|
| 587 |
+
"Oseltamivir π¦ ": "Questions about the antiviral medication Oseltamivir π",
|
| 588 |
+
"IM Epinephrine π": "Questions related to intramuscular administration of epinephrine πͺ",
|
| 589 |
+
"Hypokalemia π": "Questions pertaining to low potassium levels in blood π©Έ",
|
| 590 |
+
"Succinylcholine π": "Questions on the use and side-effects of Succinylcholine π",
|
| 591 |
+
"Testicular Torsion π€": "Questions related to the diagnosis and treatment of testicular torsion π₯",
|
| 592 |
+
"Phosphoinositol System π§¬": "Questions about the Phosphoinositol signalling system π ",
|
| 593 |
+
"Ramipril π": "Questions related to the ACE inhibitor Ramipril π©Ί"
|
| 594 |
+
}
|
| 595 |
+
|
| 596 |
+
# Create columns
|
| 597 |
+
col1, col2, col3, col4 = st.columns([1, 1, 1, 1], gap="small")
|
| 598 |
+
|
| 599 |
+
# Add buttons to columns
|
| 600 |
+
if col1.button("Ultrasound with Doppler π"):
|
| 601 |
+
StreamLLMChatResponse(descriptions["Ultrasound with Doppler π"])
|
| 602 |
+
|
| 603 |
+
if col2.button("Oseltamivir π¦ "):
|
| 604 |
+
StreamLLMChatResponse(descriptions["Oseltamivir π¦ "])
|
| 605 |
+
|
| 606 |
+
if col3.button("IM Epinephrine π"):
|
| 607 |
+
StreamLLMChatResponse(descriptions["IM Epinephrine π"])
|
| 608 |
+
|
| 609 |
+
if col4.button("Hypokalemia π"):
|
| 610 |
+
StreamLLMChatResponse(descriptions["Hypokalemia π"])
|
| 611 |
+
|
| 612 |
+
col5, col6, col7, col8 = st.columns([1, 1, 1, 1], gap="small")
|
| 613 |
+
|
| 614 |
+
if col5.button("Succinylcholine π"):
|
| 615 |
+
StreamLLMChatResponse(descriptions["Succinylcholine π"])
|
| 616 |
+
|
| 617 |
+
if col6.button("Testicular Torsion π€"):
|
| 618 |
+
StreamLLMChatResponse(descriptions["Testicular Torsion π€"])
|
| 619 |
+
|
| 620 |
+
if col7.button("Phosphoinositol System π§¬"):
|
| 621 |
+
StreamLLMChatResponse(descriptions["Phosphoinositol System π§¬"])
|
| 622 |
+
|
| 623 |
+
if col8.button("Ramipril π"):
|
| 624 |
+
StreamLLMChatResponse(descriptions["Ramipril π"])
|
| 625 |
+
|
| 626 |
+
|
| 627 |
+
|
| 628 |
# 17. Main
|
| 629 |
def main():
|
| 630 |
|
|
|
|
| 632 |
prompt = f"Write ten funny jokes that are tweet length stories that make you laugh. Show as markdown outline with emojis for each."
|
| 633 |
|
| 634 |
# Add Wit and Humor buttons
|
| 635 |
+
# add_witty_humor_buttons()
|
| 636 |
+
add_medical_exam_buttons()
|
| 637 |
|
| 638 |
example_input = st.text_input("Enter your example text:", value=prompt, help="Enter text to get a response from DromeLlama.")
|
| 639 |
if st.button("Run Prompt With DromeLlama", help="Click to run the prompt."):
|