deep-learning-analytics commited on
Commit
ee5fddb
1 Parent(s): 4c3ae58

added image selector

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -7,9 +7,13 @@ from transformers import SegformerForSemanticSegmentation, SegformerFeatureExtra
7
  from torch import nn
8
  import streamlit as st
9
 
10
-
11
  st.title('Semantic Segmentation using SegFormer')
12
- raw_image = st.file_uploader('Raw Input Image')
 
 
 
 
13
  if raw_image is not None:
14
  df = pd.read_csv('class_dict_seg.csv')
15
  classes = df['name']
 
7
  from torch import nn
8
  import streamlit as st
9
 
10
+ img_path = None
11
  st.title('Semantic Segmentation using SegFormer')
12
+ #raw_image = st.file_uploader('Raw Input Image')
13
+ raw_image = st.selectbox(
14
+ 'Choose any one image for inference',
15
+ ('image1.jpg', 'image2.jpg', 'image3.jpg'))
16
+
17
  if raw_image is not None:
18
  df = pd.read_csv('class_dict_seg.csv')
19
  classes = df['name']