ZeroGPU has not been initialized when trying to use space in other space
Hi iam trying to access a hugging face space into other spacemy app.pyimport os
import gradio as gr
from huggingface_hub import HfApi
from gradio_client.exceptions import AuthenticationError

def load_space():
    # Try to get the token from environment variable
    REDACTED_TOKEN = os.environ.get('api')
    
    if not REDACTED_TOKEN:
        print("Warning: HUGGINGFACE_TOKEN environment variable not set.")
        print("Attempting to use Hugging Face CLI login...")
    
    try:
        # Attempt to load the space
        iface = gr.load(
            name="My space",
            REDACTED_TOKEN=REDACTED_TOKEN,
            src="spaces"
        )
        print("Space loaded successfully!")
        return iface
    except AuthenticationError as e:
        print(f"Authentication error: {e}")
        print("Please make sure you're logged in or using a valid token.")
        return None
    except Exception as e:
        print(f"An error occurred: {e}")
        return None

def main():
    iface = load_space()
    if iface:
        iface.queue(max_size=300)
        iface.launch(debug=False)
    else:
        print("Failed to load the space. Please check the error messages above.")

if __name__ == "__main__":
    main()My outputruntime errorZeroGPU has not been initializedContainer logs:===== Application Startup at 2024-08-29 21:20:08 =====

Fetching Space from: https://huggingface.co/spaces/....
Loaded as API: https://---.hf.space ✔
Space loaded successfully!
Running on local URL:  http://0.0.0.0:7860

To create a public link, set `share=True` in `launch()`.
2024-08-30T02:14:35Z
Zero GPU spaces will cause an error if the spaces library is not imported first. (This has been made even stricter by a recent specification change.)In addition, at least one function with the@spacesdecorator must be present or an error will occur as well.Dummy functions are fine.import spaces
import os
import gradio as gr
from huggingface_hub import HfApi
from gradio_client.exceptions import AuthenticationError

@spaces.GPU
def dummy(): # just a dummy
    pass

def load_space():
    # Try to get the token from environment variable
    REDACTED_TOKEN = os.environ.get('api')
    
    if not REDACTED_TOKEN:
        print("Warning: HUGGINGFACE_TOKEN environment variable not set.")
        print("Attempting to use Hugging Face CLI login...")
    
    try:
        # Attempt to load the space
        iface = gr.load(
            name="My space",
            REDACTED_TOKEN=REDACTED_TOKEN,
            src="spaces"
        )
        print("Space loaded successfully!")
        return iface
    except AuthenticationError as e:
        print(f"Authentication error: {e}")
        print("Please make sure you're logged in or using a valid token.")
        return None
    except Exception as e:
        print(f"An error occurred: {e}")
        return None

def main():
    iface = load_space()
    if iface:
        iface.queue(max_size=300)
        iface.launch(debug=False)
    else:
        print("Failed to load the space. Please check the error messages above.")

if __name__ == "__main__":
    main()