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

How do i connect omniparser to a program of mine #79

Open
techsparkling opened this issue Nov 7, 2024 · 11 comments
Open

How do i connect omniparser to a program of mine #79

techsparkling opened this issue Nov 7, 2024 · 11 comments

Comments

@techsparkling
Copy link

Is there any kind of free/paid api i could use to build with omniparser? Please help me out on this one.

@Kolaposki
Copy link

You can use with gradio, check out.

pip install gradio_client

from gradio_client import Client, handle_file

client = Client("microsoft/OmniParser")
result = client.predict(
image_input=handle_file('https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png'),
box_threshold=0.05,
iou_threshold=0.1,
api_name="/process"
)
print(result)

https://huggingface.co/spaces/microsoft/OmniParser

@yadong-lu
Copy link
Collaborator

Hi @techsparkling, yes, as @Kolaposki points out, you can try to use gradio client for hosting an api. We currently only have a HF demo, but don't have an existing public API.

@techsparkling
Copy link
Author

Is there anyway to host omniparser in cloude and make use of it? The hugging face one doesnt work for me it results in an error related to preconfig json.

@abrichr
Copy link

abrichr commented Nov 21, 2024

@techsparkling please see #52.

Feedback welcome! 🙏

@techsparkling
Copy link
Author

@abrichr Hi, i am having issues with using ec2 for omniparser, could you please help?

@abrichr
Copy link

abrichr commented Nov 25, 2024

@techsparkling what is the issue? Were you able to follow the instructions at the top of deploy.py?

@techsparkling
Copy link
Author

techsparkling commented Nov 27, 2024

@abrichr Hello sir, thanks for replying

botocore.exceptions.ClientError: An error occurred (VcpuLimitExceeded) when calling the RunInstances operation: You have requested more vCPU capacity than your current vCPU limit of 0 allows for the instance bucket that the specified instance type belongs to. Please visit http://aws.amazon.com/contact-us/ec2-request to request an adjustment to this limit. I have asked aws for an increase in the capacity. Just wanted to also is there any other way to host this and the running cost in doing that. Thanks

@Kolaposki
Copy link

You can host on Fly.io easily using a Dockerfile found in this repo.

https://github.com/addy999/omniparser-api

@techsparkling
Copy link
Author

You can host on Fly.io easily using a Dockerfile found in this repo.

https://github.com/addy999/omniparser-api

Wow thanks. Is there any documentation or tutorial i could follow to get this done?

@techsparkling
Copy link
Author

techsparkling commented Nov 27, 2024

@Kolaposki Thanks a lot, it would be great if you could help me resolve this problem.

Failed: failed to wait for VM 080e47df539908 in started state: not_found: machine not found

Error: failed to wait for VM.... in started state: not_found: machine not found (Request ID: ....) (Trace ID:....)

When i run fly logs:

2024-11-27T16:53:46Z runner[...] [error]Not enough space to unpack image, possibly exceeds maximum of 8GB uncompressed

@techsparkling
Copy link
Author

@abrichr Could you help me out on this one #99

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