Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -40,6 +40,15 @@ def predict(model, labels, img):
|
|
40 |
|
41 |
def main():
|
42 |
st.title('Oxford 102 Flower Classification Demo')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
43 |
model = load_model()
|
44 |
labels = load_labels()
|
45 |
image = load_image()
|
@@ -47,8 +56,8 @@ def main():
|
|
47 |
if result and image is not None:
|
48 |
st.markdown('**_Calculating results..._**')
|
49 |
flower, closeness = predict(model, labels, image)
|
50 |
-
st.markdown(f'<
|
51 |
-
st.markdown(f'<
|
52 |
|
53 |
if __name__ == '__main__':
|
54 |
main()
|
|
|
40 |
|
41 |
def main():
|
42 |
st.title('Oxford 102 Flower Classification Demo')
|
43 |
+
st.markdown('### NAME:')
|
44 |
+
st.write('Oxford 102 Flower Classification')
|
45 |
+
st.markdown('### CLASS:')
|
46 |
+
st.write('Deep Learning')
|
47 |
+
st.markdown('### LEVEL:')
|
48 |
+
st.write('Beginner')
|
49 |
+
st.markdown('---')
|
50 |
+
st.write("This is a demo of an image classification model trained on the Oxford 102 Flower Dataset. It can identify 102 different types of flowers. To test the model, upload an image of a flower and click the 'Run on image' button.")
|
51 |
+
st.markdown('---')
|
52 |
model = load_model()
|
53 |
labels = load_labels()
|
54 |
image = load_image()
|
|
|
56 |
if result and image is not None:
|
57 |
st.markdown('**_Calculating results..._**')
|
58 |
flower, closeness = predict(model, labels, image)
|
59 |
+
st.markdown(f'<h4 style="color:blue;">Flower Type: <span style="color:black;">{flower}</span></h4>', unsafe_allow_html=True)
|
60 |
+
st.markdown(f'<h4 style="color:green;">Closeness: <span style="color:black;">{closeness}%</span></h4>', unsafe_allow_html=True)
|
61 |
|
62 |
if __name__ == '__main__':
|
63 |
main()
|