tsambo commited on
Commit
d7c0f42
·
1 Parent(s): e0cd5cc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -2,7 +2,7 @@ import streamlit as st
2
  from transformers import pipeline
3
  from PIL import Image
4
 
5
- pipeline = pipeline("image-classification")
6
 
7
  st.title("Predict the class of an image")
8
 
@@ -17,4 +17,6 @@ if file_name is not None:
17
 
18
  col2.header("Probabilities")
19
  for p in predictions:
20
- col2.subheader(f"{ p['label'] }: { round(p['score'] * 100, 1)}%")
 
 
 
2
  from transformers import pipeline
3
  from PIL import Image
4
 
5
+ pipeline = pipeline(task = "image-classification", model = "microsoft/beit-base-patch16-224-pt22k-ft22k")
6
 
7
  st.title("Predict the class of an image")
8
 
 
17
 
18
  col2.header("Probabilities")
19
  for p in predictions:
20
+ col2.subheader(f"{ p['label'] }: { round(p['score'] * 100, 1)}%")
21
+
22
+