Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,10 +5,10 @@ pipeline = pipeline(task="image-classification", model="julienc/hotdog-not-hotd
|
|
| 5 |
st.title("Hot Dog? Or Not?")
|
| 6 |
file_name = st.file_uploader("Upload a hot dog candidate image")
|
| 7 |
if file_name is not None:
|
| 8 |
-
col1, col2 = st.columns(2)
|
| 9 |
image = Image.open(file_name)
|
| 10 |
col1.image(image, use_column_width=True)
|
| 11 |
predictions = pipeline(image)
|
| 12 |
col2.header("Probabilities")
|
| 13 |
for p in predictions:
|
| 14 |
-
col2.subheader(f"{ p['label'] }: { round(p['score'] * 100, 1)}%")
|
|
|
|
| 5 |
st.title("Hot Dog? Or Not?")
|
| 6 |
file_name = st.file_uploader("Upload a hot dog candidate image")
|
| 7 |
if file_name is not None:
|
| 8 |
+
col1, col2 = st.columns(2)
|
| 9 |
image = Image.open(file_name)
|
| 10 |
col1.image(image, use_column_width=True)
|
| 11 |
predictions = pipeline(image)
|
| 12 |
col2.header("Probabilities")
|
| 13 |
for p in predictions:
|
| 14 |
+
col2.subheader(f"{ p['label'] }: { round(p['score'] * 100, 1)}%")
|