-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Cannot connect to SSE endpoint #8256
Comments
Hi @AndreyVLD! Thanks for raising this. Can you confirm what environment you're running this in, and do you run into an error when connecting to the space (before running the predict function)? As a side note, I ran your example and was able to successfully connect to the space. We have a few issues right now with dealing with files however: #7778 #7834 #6623 |
To answer your questions:
const results = await hfApp.predict("/tryon", [
{"background": placeholderImage, "layers": [placeholderImage], "composite": placeholderImage},
placeholderImage,
"Hello!!",
true,
false,
30,
42,
]); I correctly get the following output as I print
so it connects.
|
@hannahblair I think it might be something specific to JavaScript version of Gradio since running this code snippet works fine and returns the temp path to 2 images (as is the API specification of this endpoint): from gradio_client import Client, file
def main():
client = Client("yisol/IDM-VTON")
img = file('walter.png')
print(client.view_api())
result = client.predict(
dict={"background": img,
"layers": [img], "composite": img},
garm_img=img,
garment_des="Hello!!",
is_checked=True,
is_checked_crop=False,
denoise_steps=30,
seed=42,
api_name="/tryon"
)
print(result)
if __name__ == '__main__':
main() |
Hi @AndreyVLD! This seems like it was due to the way we were handling files. I've just tested this out with #8462 and have been able to successfully send an image to that space now. Here's my demo:
With the updates in #8462 you can pass local files using the |
Describe the bug
There is a public Gradio API to this project:
https://huggingface.co/spaces/yisol/IDM-VTON
and I would like to call the/tryon
endpoint withapp.predict
but I get the following error:Cannot connect to SSE endpoint: https://yisol-idm-vton.hf.space/queue/data?session_hash=8029nofpwww.
.I have followed the API call template from the Gradio Page of the project.
Have you searched existing issues? 🔎
Reproduction
Screenshot
No response
Logs
Cannot connect to SSE endpoint: https://yisol-idm-vton.hf.space/queue/data?session_hash=8029nofpwww
System Info
Severity
Blocking usage of gradio
The text was updated successfully, but these errors were encountered: