Spaces:
Running on Zero
Running on Zero
Pubblicato da GitHub: b0a531b
Browse files
app.py
CHANGED
|
@@ -3955,6 +3955,17 @@ def build_demo() -> gr.Blocks:
|
|
| 3955 |
first_scale_selector = _scale_selector_data(schema, modality)
|
| 3956 |
|
| 3957 |
with gr.Blocks(title="FamiliarizzApp") as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3958 |
maintenance_key = gr.Textbox(visible=False)
|
| 3959 |
maintenance_result = gr.Textbox(visible=False)
|
| 3960 |
maintenance_button = gr.Button(visible=False)
|
|
|
|
| 3955 |
first_scale_selector = _scale_selector_data(schema, modality)
|
| 3956 |
|
| 3957 |
with gr.Blocks(title="FamiliarizzApp") as demo:
|
| 3958 |
+
# ZeroGPU now validates decorated functions by inspecting Gradio's
|
| 3959 |
+
# registered handlers. This hidden, never-triggered control keeps the
|
| 3960 |
+
# free Space eligible without consuming GPU quota during normal use.
|
| 3961 |
+
zero_gpu_result = gr.Textbox(visible=False)
|
| 3962 |
+
zero_gpu_button = gr.Button(visible=False)
|
| 3963 |
+
zero_gpu_button.click(
|
| 3964 |
+
zero_gpu_probe,
|
| 3965 |
+
outputs=zero_gpu_result,
|
| 3966 |
+
api_name=False,
|
| 3967 |
+
show_progress="hidden",
|
| 3968 |
+
)
|
| 3969 |
maintenance_key = gr.Textbox(visible=False)
|
| 3970 |
maintenance_result = gr.Textbox(visible=False)
|
| 3971 |
maintenance_button = gr.Button(visible=False)
|