Commit
·
ee5fddb
1
Parent(s):
4c3ae58
added image selector
Browse files
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']
|