Spaces:
Running
Can't get Zero-GPU to work with Fastapi/Uvicorn
Hello everyone โ I'd really like to use ZeroGPU for my project, but I just can't get it to work for my use-case, and have been working on it for days now. Basically the issue is:
ZeroGPU only works for me when I enable SSR-mode in Gradio 5.+. If I don't do that I'm running into all the issues about ZeroGPU not finding the account of the user, and applying the very restrictive IP-based limits, which have been discussed in this forum. That wouldn't be a problem, but I need to server my application through FastAPI with Uvicorn, because this is the only approach that allows me to make dynamically created html-files available to the users. Unfortunately, this configuration causes the space to break on all browsers I tried, which looks like this:
If I disable SSR, Zero GPU stops working, if I enable it, the space breaks.
I've built a little example space to demonstrate the problem:
https://huggingface.co/spaces/m7n/zero_gpu_uvicorn_ssr_example?logs=build
I'd be really appreciative of any pointers on how to get this to work, it's driving me crazy!