TheKnight115 commited on
Commit
ab353b1
·
verified ·
1 Parent(s): 1d56717

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +14 -0
app.py ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+ import streamlit as st
3
+ from PIL import Image
4
+
5
+
6
+ pipe = pipeline("image-classification", model="julien-c/hotdog-not-hotdog")
7
+
8
+
9
+ uploaded_file = st.file_uploader("Choose a file")
10
+ if uploaded_file is not None:
11
+ img = Image.open(uploaded_file)
12
+ st.image(img)
13
+ predictions = pipe(img)
14
+ st.write(predictions)