Spaces:
Sleeping
Sleeping
jocko
commited on
Commit
·
fbf3ec2
1
Parent(s):
50270f3
fix image similarity detection
Browse files- src/streamlit_app.py +5 -0
src/streamlit_app.py
CHANGED
|
@@ -126,6 +126,10 @@ st.title("🩺 Multimodal Medical Chatbot")
|
|
| 126 |
query = st.text_input("Enter your medical question or symptom description:")
|
| 127 |
uploaded_files = st.file_uploader("Upload an image to find similar medical cases:", type=["png", "jpg", "jpeg"], accept_multiple_files=True)
|
| 128 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
@track
|
| 130 |
def get_chat_completion_openai(client, prompt: str):
|
| 131 |
return client.chat.completions.create(
|
|
@@ -173,6 +177,7 @@ if query:
|
|
| 173 |
|
| 174 |
if uploaded_files:
|
| 175 |
with st.spinner("Searching medical cases..."):
|
|
|
|
| 176 |
print(uploaded_files)
|
| 177 |
uploaded_file = uploaded_files[0]
|
| 178 |
st.write(f'uploading file {uploaded_file.name}')
|
|
|
|
| 126 |
query = st.text_input("Enter your medical question or symptom description:")
|
| 127 |
uploaded_files = st.file_uploader("Upload an image to find similar medical cases:", type=["png", "jpg", "jpeg"], accept_multiple_files=True)
|
| 128 |
|
| 129 |
+
st.write(f"Number of files: {len(uploaded_files)}")
|
| 130 |
+
for uploaded_file in uploaded_files:
|
| 131 |
+
st.write(f"File name: {uploaded_file.name}")
|
| 132 |
+
|
| 133 |
@track
|
| 134 |
def get_chat_completion_openai(client, prompt: str):
|
| 135 |
return client.chat.completions.create(
|
|
|
|
| 177 |
|
| 178 |
if uploaded_files:
|
| 179 |
with st.spinner("Searching medical cases..."):
|
| 180 |
+
|
| 181 |
print(uploaded_files)
|
| 182 |
uploaded_file = uploaded_files[0]
|
| 183 |
st.write(f'uploading file {uploaded_file.name}')
|