ldebele / Real-Time-Animal-Species-Detection

The aim of this project is to develop an efficient computer vision model capable of real-time wildlife detection.
https://huggingface.co/spaces/ldebele/animal_detection_app
5 stars 13 forks source link

Error at running the application #1

Closed DinoDany closed 10 months ago

DinoDany commented 10 months ago

Hello, I'm having an error when I run :

streamlit run './scripts/app.py'

The error is

FileNotFoundError: [Errno 2] No such file or directory: './data/raw'

When I look at the folder data, there is a raw.dvc

Thanks

ldebele commented 10 months ago

@DinoDany Hello! On my local machine, it retrieves the class names from the directory within data/raw where each folder represents the name of an animal class. I didn't push the raw data to github due to its large size, which is why it threw an error. so, you can manually specify a list containing the class names.

Therefore, update lines 26 and 27 in the app.py script with the following code:


classes = ['Buffalo', 'Elephant', 'Rhino', 'Zebra', "Cheetah", "Fox", "Jaguar", "Tiger", "Lion", "Panda"]
for animal in sorted(classes):
    st.sidebar.markdown(f"- *{animal.capitalize()}*")
DinoDany commented 10 months ago

This worked! Thank you so much