Hi,
I was working with a CPU Upgrade space and everything was running perfectly. After upgrading to PRO, I switched the space to zero GPU, and it stopped working. Now I’m getting the following error:
Error: No API found.
Could you please help me resolve this?
Thanks in advance!
1 Like
In Zero GPU space, the space will not function without these descriptions.
import spaces # <= this!
from diffusers import DiffusionPipeline
pipe = DiffusionPipeline.from_pretrained(...)
pipe.to('cuda')
@spaces.GPU # <= this!
def generate(prompt):
return pipe(prompt).images
gr.Interface(
fn=generate,
inputs=gr.Text(),
outputs=gr.Gallery(),
).launch()
Also, this is not limited to Zero GPU space, but the following error may still be unresolved.
Hi, I have built a Gemini 2.0 flash based photo editing app with gradio ui. This app is running perfectly fine on my local system, but when I am trying to run it on spaces it is giving me Error : No API Found.
[e1]
I have used gemini api keys in secrects
Code :
https://huggingface.co/spaces/Saurabh502/Gemini-photo/resolve/main/app.py
Please let me know your thoughts, on how to resolve this. Thanks