seu-ebers commited on
Commit
2a0a961
·
1 Parent(s): 9c94ced
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -1,12 +1,11 @@
1
- import requests
2
- import torch
3
  import streamlit as st
4
- from transformers import pipeline, AutoProcessor, LlavaForConditionalGeneration
5
  from PIL import Image
6
 
7
  pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
8
 
9
  st.title("Hot Dog? Or Not?")
 
10
  file_name = st.file_uploader("Upload a hot dog candidate image")
11
 
12
  if file_name is not None:
@@ -18,4 +17,4 @@ if file_name is not None:
18
 
19
  col2.header("Probabilities")
20
  for p in predictions:
21
- col2.subheader(f"{ p['label'] }: { round(p['score'] * 100, 1)}%")
 
 
 
1
  import streamlit as st
2
+ from transformers import pipeline
3
  from PIL import Image
4
 
5
  pipeline = pipeline(task="image-classification", model="julien-c/hotdog-not-hotdog")
6
 
7
  st.title("Hot Dog? Or Not?")
8
+
9
  file_name = st.file_uploader("Upload a hot dog candidate image")
10
 
11
  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)}%")