Update app.py (#1)
Browse files- Update app.py (3e3120479f19666ccbce3c04bf443a01d6dca910)
Co-authored-by: Aditya Chourasiya <adi-123@users.noreply.huggingface.co>
app.py
CHANGED
@@ -20,4 +20,12 @@ if uploaded_file is not None:
|
|
20 |
result = pipe(image)
|
21 |
|
22 |
# Display the result
|
23 |
-
st.write(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
result = pipe(image)
|
21 |
|
22 |
# Display the result
|
23 |
+
st.write("Classification Result:")
|
24 |
+
st.write("---------------")
|
25 |
+
|
26 |
+
for i, res in enumerate(result):
|
27 |
+
label = res["label"]
|
28 |
+
score = res["score"]
|
29 |
+
st.write(f"**{i+1}. {label}**: {score:.2f}%")
|
30 |
+
|
31 |
+
st.write("---------------")
|