frankai98 commited on
Commit
c233bdc
·
verified ·
1 Parent(s): 2717c97

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +0 -17
app.py CHANGED
@@ -32,23 +32,6 @@ pipe = load_model()
32
  # Create file uploader
33
  uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
34
 
35
- # Add example images
36
- st.markdown("### Or try an example:")
37
- col1, col2 = st.columns(2)
38
-
39
- EXAMPLE_1 = "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/person1.jpg"
40
- EXAMPLE_2 = "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/person2.jpg"
41
-
42
- with col1:
43
- if st.button("Example 1"):
44
- st.session_state.example_image = EXAMPLE_1
45
- st.session_state.example_loaded = True
46
-
47
- with col2:
48
- if st.button("Example 2"):
49
- st.session_state.example_image = EXAMPLE_2
50
- st.session_state.example_loaded = True
51
-
52
  # Function to get top prediction
53
  def get_top_prediction(predictions):
54
  # Get the prediction with highest confidence
 
32
  # Create file uploader
33
  uploaded_file = st.file_uploader("Choose an image...", type=["jpg", "jpeg", "png"])
34
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
35
  # Function to get top prediction
36
  def get_top_prediction(predictions):
37
  # Get the prediction with highest confidence