Spaces:
Sleeping
Sleeping
Create app.py
Browse files
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)
|