Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -672,14 +672,13 @@ if uploaded_file is not None:
|
|
| 672 |
# Display raw JSON data in expander
|
| 673 |
with st.expander("View Raw JSON Response"):
|
| 674 |
st.json(result)
|
| 675 |
-
|
| 676 |
-
|
| 677 |
else:
|
| 678 |
st.error("Failed to process image")
|
| 679 |
-
|
| 680 |
-
def calculate_similarity(text1, text2):
|
| 681 |
-
matcher = SequenceMatcher(None, text1, text2)
|
| 682 |
-
return matcher.ratio()
|
| 683 |
-
|
| 684 |
-
|
| 685 |
-
main()
|
|
|
|
| 672 |
# Display raw JSON data in expander
|
| 673 |
with st.expander("View Raw JSON Response"):
|
| 674 |
st.json(result)
|
| 675 |
+
else:
|
| 676 |
+
st.warning("No faces detected in the image")
|
| 677 |
else:
|
| 678 |
st.error("Failed to process image")
|
| 679 |
+
|
| 680 |
+
def calculate_similarity(text1, text2):
|
| 681 |
+
matcher = SequenceMatcher(None, text1, text2)
|
| 682 |
+
return matcher.ratio()
|
| 683 |
+
if __name__ == "__main__":
|
| 684 |
+
main()
|
|
|