Update app.py
Browse files
app.py
CHANGED
@@ -34,19 +34,22 @@ def inference_clip(options, image, processor, model):
|
|
34 |
|
35 |
#################################
|
36 |
#### LAYOUT
|
|
|
37 |
|
38 |
#CLIP_large = load_clip(model_size='large')
|
39 |
model_name = "openai/clip-vit-large-patch14-336"
|
40 |
classifier = pipeline("zero-shot-image-classification", model = model_name)
|
41 |
|
|
|
|
|
42 |
#### Loading picture
|
43 |
-
|
|
|
|
|
44 |
if picture_file is not None:
|
45 |
image = Image.open(picture_file)
|
46 |
st.image(image, caption='Please upload an image of the damage', use_column_width=True)
|
47 |
|
48 |
-
col_l, col_r = st.columns(2)
|
49 |
-
|
50 |
#image
|
51 |
with col_l:
|
52 |
default_options = ['black', 'white', 'gray', 'red', 'blue', 'silver', 'red', 'brown', 'green', 'orange', 'beige', 'pruple', 'gold', 'yellow']
|
|
|
34 |
|
35 |
#################################
|
36 |
#### LAYOUT
|
37 |
+
col_l, col_r = st.columns(2)
|
38 |
|
39 |
#CLIP_large = load_clip(model_size='large')
|
40 |
model_name = "openai/clip-vit-large-patch14-336"
|
41 |
classifier = pipeline("zero-shot-image-classification", model = model_name)
|
42 |
|
43 |
+
|
44 |
+
|
45 |
#### Loading picture
|
46 |
+
with col_l:
|
47 |
+
picture_file = st.file_uploader("Picture :", type=["jpg", "jpeg", "png"])
|
48 |
+
|
49 |
if picture_file is not None:
|
50 |
image = Image.open(picture_file)
|
51 |
st.image(image, caption='Please upload an image of the damage', use_column_width=True)
|
52 |
|
|
|
|
|
53 |
#image
|
54 |
with col_l:
|
55 |
default_options = ['black', 'white', 'gray', 'red', 'blue', 'silver', 'red', 'brown', 'green', 'orange', 'beige', 'pruple', 'gold', 'yellow']
|