Spaces:
Running on Zero
Running on Zero
| import gradio as gr | |
| import spaces | |
| from fastapi import FastAPI | |
| import asyncio | |
| app = FastAPI() | |
| def test_fn(): | |
| return "Test" | |
| with gr.Blocks() as demo: | |
| gr.Button("Test").click(test_fn) | |
| app_mounted = gr.mount_gradio_app(app, demo, path="/") | |
| if hasattr(spaces, "zero") and hasattr(spaces.zero, "startup"): | |
| print("Found 'startup' in spaces.zero!") | |