chenemii commited on
Commit
8065575
·
1 Parent(s): cc3d7d0

Switch Hugging Face Space to use new Gradio interface

Browse files

- Update README.md to use 'sdk: gradio' instead of streamlit
- Change app_file to point to app.py with new Gradio interface
- Update app.py to launch the 5-step UI flow instead of streamlit
- Add packages.txt for system dependencies
- This will activate the new step-based interface with floating sidebar

Files changed (3) hide show
  1. README.md +2 -2
  2. app.py +26 -0
  3. packages.txt +3 -0
README.md CHANGED
@@ -3,8 +3,8 @@ title: Par-ity Project
3
  emoji: ⛳
4
  colorFrom: blue
5
  colorTo: green
6
- sdk: streamlit
7
- app_file: app/streamlit_app.py
8
  pinned: false
9
  ---
10
 
 
3
  emoji: ⛳
4
  colorFrom: blue
5
  colorTo: green
6
+ sdk: gradio
7
+ app_file: app.py
8
  pinned: false
9
  ---
10
 
app.py ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """
3
+ Golf Swing Analysis - Hugging Face Spaces Entry Point (Gradio Interface)
4
+ """
5
+
6
+ import os
7
+ import sys
8
+
9
+ # Add the app directory to the path for imports
10
+ sys.path.append(os.path.join(os.path.dirname(__file__), 'app'))
11
+
12
+ # Import and run the new Gradio app
13
+ try:
14
+ from app.gradio_app import create_interface
15
+
16
+ if __name__ == "__main__":
17
+ demo = create_interface()
18
+ demo.launch(share=True)
19
+ except ImportError as e:
20
+ # Fallback import method
21
+ sys.path.insert(0, 'app')
22
+ import gradio_app
23
+
24
+ if __name__ == "__main__":
25
+ demo = gradio_app.create_interface()
26
+ demo.launch(share=True)
packages.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ ffmpeg
2
+ libgl1-mesa-glx
3
+ libglib2.0-0