Spaces:
Sleeping
Sleeping
Remove hf_oauth + LoginButton — they conflict with native ZeroGPU auth
Browse files
app.py
CHANGED
|
@@ -728,14 +728,8 @@ def on_load_demo():
|
|
| 728 |
|
| 729 |
|
| 730 |
@spaces.GPU(duration=60)
|
| 731 |
-
def _gpu_process(question: str
|
| 732 |
-
"""Inference only — models already on cuda from module-level loading.
|
| 733 |
-
|
| 734 |
-
The oauth_token parameter is auto-injected by Gradio when the user is
|
| 735 |
-
logged in via gr.LoginButton; spaces.GPU uses it to attribute the GPU
|
| 736 |
-
call to the authenticated user (so they get their Pro quota instead of
|
| 737 |
-
being treated as anonymous).
|
| 738 |
-
"""
|
| 739 |
agent = get_agent()
|
| 740 |
return agent.process(question)
|
| 741 |
|
|
@@ -798,11 +792,6 @@ def build_app() -> gr.Blocks:
|
|
| 798 |
'</div>'
|
| 799 |
'</div>'
|
| 800 |
)
|
| 801 |
-
# ZeroGPU requires authenticated identity for proper quota.
|
| 802 |
-
# Iframes don't always pass HF cookies, so we surface an explicit
|
| 803 |
-
# OAuth button. After login the user gets 25min/day Pro quota.
|
| 804 |
-
with gr.Row():
|
| 805 |
-
gr.LoginButton(value="Sign in with Hugging Face", size="sm")
|
| 806 |
|
| 807 |
# Upload
|
| 808 |
with gr.Row(elem_classes=["upload-row"]):
|
|
|
|
| 728 |
|
| 729 |
|
| 730 |
@spaces.GPU(duration=60)
|
| 731 |
+
def _gpu_process(question: str) -> dict:
|
| 732 |
+
"""Inference only — models already on cuda from module-level loading."""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 733 |
agent = get_agent()
|
| 734 |
return agent.process(question)
|
| 735 |
|
|
|
|
| 792 |
'</div>'
|
| 793 |
'</div>'
|
| 794 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 795 |
|
| 796 |
# Upload
|
| 797 |
with gr.Row(elem_classes=["upload-row"]):
|