Spaces:
Build error
Build error
no message
Browse files
app.py
CHANGED
|
@@ -41,9 +41,9 @@ def main():
|
|
| 41 |
'''
|
| 42 |
Model
|
| 43 |
'''
|
| 44 |
-
|
| 45 |
-
if
|
| 46 |
-
st.write("You selected",
|
| 47 |
|
| 48 |
'''
|
| 49 |
Dataset
|
|
@@ -58,7 +58,7 @@ def main():
|
|
| 58 |
click to classify
|
| 59 |
image_object = dataset['pasta'][0]
|
| 60 |
'''
|
| 61 |
-
if
|
| 62 |
if st.button("Classify images"):
|
| 63 |
|
| 64 |
classification_obj1 =[]
|
|
@@ -73,8 +73,7 @@ def main():
|
|
| 73 |
st.write("# FLAG 3")
|
| 74 |
|
| 75 |
#modle instance
|
| 76 |
-
|
| 77 |
-
classifier_pipeline = pipeline('image-classification', model=shosen_model_name, device=0)
|
| 78 |
st.write("# FLAG 4")
|
| 79 |
|
| 80 |
#classification
|
|
|
|
| 41 |
'''
|
| 42 |
Model
|
| 43 |
'''
|
| 44 |
+
chosen_model_name = st.selectbox("Select the model to use", MODELS, index=0)
|
| 45 |
+
if chosen_model_name is not None:
|
| 46 |
+
st.write("You selected", chosen_model_name)
|
| 47 |
|
| 48 |
'''
|
| 49 |
Dataset
|
|
|
|
| 58 |
click to classify
|
| 59 |
image_object = dataset['pasta'][0]
|
| 60 |
'''
|
| 61 |
+
if chosen_model_name is not None and shosen_dataset_name is not None:
|
| 62 |
if st.button("Classify images"):
|
| 63 |
|
| 64 |
classification_obj1 =[]
|
|
|
|
| 73 |
st.write("# FLAG 3")
|
| 74 |
|
| 75 |
#modle instance
|
| 76 |
+
classifier_pipeline = pipeline('image-classification', model=chosen_model_name, device=0)
|
|
|
|
| 77 |
st.write("# FLAG 4")
|
| 78 |
|
| 79 |
#classification
|