Spaces:
Sleeping
Sleeping
nurindahpratiwi
commited on
Commit
•
075c8ee
1
Parent(s):
0fc7d3b
change some code
Browse files
app.py
CHANGED
@@ -6,9 +6,9 @@ from PIL import Image
|
|
6 |
#pipeline = pipeline(task="image-classification", model="Rajaram1996/FacialEmoRecog")
|
7 |
pipeline = pipeline(task="image-classification", model="Bazaar/cv_apple_leaf_disease_detection")
|
8 |
|
9 |
-
st.title("
|
10 |
|
11 |
-
file_name = st.file_uploader("Upload a
|
12 |
|
13 |
if file_name is not None:
|
14 |
col1, col2 = st.columns(2)
|
@@ -17,6 +17,6 @@ if file_name is not None:
|
|
17 |
col1.image(image, use_column_width=True)
|
18 |
predictions = pipeline(image)
|
19 |
|
20 |
-
col2.header("
|
21 |
for p in predictions:
|
22 |
col2.subheader(f"{ p['label'] }: { round(p['score'] * 100, 1)}%")
|
|
|
6 |
#pipeline = pipeline(task="image-classification", model="Rajaram1996/FacialEmoRecog")
|
7 |
pipeline = pipeline(task="image-classification", model="Bazaar/cv_apple_leaf_disease_detection")
|
8 |
|
9 |
+
st.title("Leaf disease?")
|
10 |
|
11 |
+
file_name = st.file_uploader("Upload a leaf candidate image")
|
12 |
|
13 |
if file_name is not None:
|
14 |
col1, col2 = st.columns(2)
|
|
|
17 |
col1.image(image, use_column_width=True)
|
18 |
predictions = pipeline(image)
|
19 |
|
20 |
+
col2.header("Confidence Score")
|
21 |
for p in predictions:
|
22 |
col2.subheader(f"{ p['label'] }: { round(p['score'] * 100, 1)}%")
|