Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sample larger than population or is negative #5

Open
CherryLover opened this issue Apr 19, 2024 · 7 comments
Open

Sample larger than population or is negative #5

CherryLover opened this issue Apr 19, 2024 · 7 comments

Comments

@CherryLover
Copy link

hi, I'm a Python beginner, you did what I wanted to do, this project so cool.

I clone and run, it will show on the web page: 'Sample larger than population or is negative'.

I guess it's because I'm providing too little data? I have 60 images in the images directory. If that's the problem, how many images do I need to provide for proper use?

Also, although I provided 60 images, after executing 'python generate_embeddings.py', I printed them in the console

Inserted embeddings 30 photos into Chroma in 0.05 seconds
@tomhallmain
Copy link

@CherryLover For some reason embeddings are only generated for JPGs in the current version. Either make the images all JPG (not JPEG) or update the line in generate_embeddings.py to add conditions for other file types:
if file_path.lower().endswith('.jpg'):

@JenniePing
Copy link

JenniePing commented May 15, 2024

hi, I got the same problem. But I did use .jpg, it doesn't work for me. I have no idea about the problem. Did anyone fix it plz ? :(

@tomhallmain
Copy link

@JenniePing Not sure how to help in your case except to double check you have enough images in the directory and that you run generate_embeddings.py before running start_web.py.

@JenniePing
Copy link

@tomhallmain Thank you! It worked as I provided 2k images.
I saw the random range is 52, so maybe it works exactly when having more than 52 images? Or can just make the range smaller.

@marckohlbrugge
Copy link

marckohlbrugge commented Aug 1, 2024

Are there any other requirements besides using .jpg?

I've been trying to get this set up, but the web interface doesn't see any of the images. Despite the embedding script saying "Inserted embeddings 419 photos into Chroma in 0.51 seconds"

Edit: setting CHROME_PATH=./images/foobar_chrome in front of the commands fixed my issue. I think the CHROME_PATH was calculated differently between the generate_embeddings.py and start_web.py scripts

@tomhallmain
Copy link

@marckohlbrugge Not sure how to help in your case either, but you can try using my fork here

@marckohlbrugge
Copy link

@marckohlbrugge Not sure how to help in your case either, but you can try using my fork here

I was able to fix the issue by manually setting CHROME_PATH. But I will try out your fork as well as I like the additions you made 🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants