Spaces:
Sleeping
Sleeping
jocko
commited on
Commit
·
3320c6e
1
Parent(s):
b9bdf95
fix image similarity detection
Browse files- src/streamlit_app.py +5 -5
src/streamlit_app.py
CHANGED
|
@@ -145,10 +145,6 @@ st.title("🩺 Multimodal Medical Chatbot")
|
|
| 145 |
query = st.text_input("Enter your medical question or symptom description:")
|
| 146 |
uploaded_files = st.file_uploader("Upload an image to find similar medical cases:", type=["png", "jpg", "jpeg"], accept_multiple_files=True)
|
| 147 |
|
| 148 |
-
st.write(f"Number of files: {len(uploaded_files)}")
|
| 149 |
-
for uploaded_file in uploaded_files:
|
| 150 |
-
st.write(f"File name: {uploaded_file.name}")
|
| 151 |
-
|
| 152 |
|
| 153 |
if query:
|
| 154 |
with st.spinner("Searching medical cases..."):
|
|
@@ -174,7 +170,11 @@ if query:
|
|
| 174 |
else:
|
| 175 |
st.warning("OpenAI API key not found. Please set OPENAI_API_KEY as a secret environment variable.")
|
| 176 |
|
| 177 |
-
if uploaded_files:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 178 |
with st.spinner("Searching medical cases..."):
|
| 179 |
|
| 180 |
print(uploaded_files)
|
|
|
|
| 145 |
query = st.text_input("Enter your medical question or symptom description:")
|
| 146 |
uploaded_files = st.file_uploader("Upload an image to find similar medical cases:", type=["png", "jpg", "jpeg"], accept_multiple_files=True)
|
| 147 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 148 |
|
| 149 |
if query:
|
| 150 |
with st.spinner("Searching medical cases..."):
|
|
|
|
| 170 |
else:
|
| 171 |
st.warning("OpenAI API key not found. Please set OPENAI_API_KEY as a secret environment variable.")
|
| 172 |
|
| 173 |
+
if uploaded_files is not None:
|
| 174 |
+
st.write(f"Number of files: {len(uploaded_files)}")
|
| 175 |
+
for uploaded_file in uploaded_files:
|
| 176 |
+
st.write(f"File name: {uploaded_file.name}")
|
| 177 |
+
|
| 178 |
with st.spinner("Searching medical cases..."):
|
| 179 |
|
| 180 |
print(uploaded_files)
|