Spaces:
Build error
Build error
no message
Browse files
app.py
CHANGED
|
@@ -115,33 +115,31 @@ def main():
|
|
| 115 |
# import subprocess
|
| 116 |
# subprocess.call(["shutdown", "-r", "-t", "0"])
|
| 117 |
|
| 118 |
-
with CONTAINER_BODY:
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
if
|
| 137 |
-
|
| 138 |
-
|
| 139 |
-
|
| 140 |
-
|
| 141 |
-
|
| 142 |
-
|
| 143 |
-
|
| 144 |
-
#st.write(classification_array)
|
| 145 |
-
|
| 146 |
if __name__ == "__main__":
|
| 147 |
main()
|
|
|
|
| 115 |
# import subprocess
|
| 116 |
# subprocess.call(["shutdown", "-r", "-t", "0"])
|
| 117 |
|
| 118 |
+
#with CONTAINER_BODY:
|
| 119 |
+
with CONTAINER_TOP:
|
| 120 |
+
st.markdown("This app uses several 🤗 models to classify images stored in 🤗 datasets.")
|
| 121 |
+
st.write("Soon we will have a dataset template")
|
| 122 |
+
|
| 123 |
+
#Model
|
| 124 |
+
chosen_model_name = COLS[0].selectbox("Select the model to use", MODELS, index=0)
|
| 125 |
+
if chosen_model_name is not None:
|
| 126 |
+
COLS[0].write("You selected", chosen_model_name)
|
| 127 |
+
|
| 128 |
+
#Dataset
|
| 129 |
+
shosen_dataset_name = COLS[0].selectbox("Select the dataset to use", DATASETS, index=0)
|
| 130 |
+
if shosen_dataset_name is not None:
|
| 131 |
+
COLS[0].write("You selected", shosen_dataset_name)
|
| 132 |
+
|
| 133 |
+
#click to classify
|
| 134 |
+
#image_object = dataset['pasta'][0]
|
| 135 |
+
if chosen_model_name is not None and shosen_dataset_name is not None:
|
| 136 |
+
if COLS[0].button("Classify images"):
|
| 137 |
+
|
| 138 |
+
#classification_array =[]
|
| 139 |
+
classification_result = classify_full_dataset(shosen_dataset_name, chosen_model_name)
|
| 140 |
+
CONTAINER_LOOP.write(f"Classification result: {classification_result}")
|
| 141 |
+
#classification_array.append(classification_result)
|
| 142 |
+
#st.write("# FLAG 6")
|
| 143 |
+
#st.write(classification_array)
|
|
|
|
|
|
|
| 144 |
if __name__ == "__main__":
|
| 145 |
main()
|