aiqtech commited on
Commit
0aae5f3
·
verified ·
1 Parent(s): f15b9a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -5
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
- with gr.Blocks(title="AI Pose Generator") as demo:
 
 
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
- # Launch the app
332
- if __name__ == "__main__":
333
- demo.launch()
 
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()