Update app.py
Browse files
app.py
CHANGED
|
@@ -253,8 +253,10 @@ def check_api_status():
|
|
| 253 |
return "✅ API key configured - Advanced AI ready"
|
| 254 |
return "⚠️ API key not set - Template mode active"
|
| 255 |
|
| 256 |
-
# Create Gradio interface
|
| 257 |
-
|
|
|
|
|
|
|
| 258 |
keypoints_state = gr.State({})
|
| 259 |
|
| 260 |
gr.Markdown("""
|
|
@@ -328,6 +330,6 @@ with gr.Blocks(title="AI Pose Generator") as demo:
|
|
| 328 |
outputs=[pose_image, json_output, keypoints_state]
|
| 329 |
)
|
| 330 |
|
| 331 |
-
#
|
| 332 |
-
|
| 333 |
-
|
|
|
|
| 253 |
return "✅ API key configured - Advanced AI ready"
|
| 254 |
return "⚠️ API key not set - Template mode active"
|
| 255 |
|
| 256 |
+
# Create Gradio interface - IMPORTANT: Must be named 'app' for Hugging Face Spaces
|
| 257 |
+
app = gr.Blocks(title="AI Pose Generator")
|
| 258 |
+
|
| 259 |
+
with app:
|
| 260 |
keypoints_state = gr.State({})
|
| 261 |
|
| 262 |
gr.Markdown("""
|
|
|
|
| 330 |
outputs=[pose_image, json_output, keypoints_state]
|
| 331 |
)
|
| 332 |
|
| 333 |
+
# For Hugging Face Spaces
|
| 334 |
+
app.queue()
|
| 335 |
+
app.launch()
|