mozzic commited on
Commit
b82b1fd
·
verified ·
1 Parent(s): 4097070

Upload app.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +25 -0
app.py ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ """
3
+ Hugging Face Spaces entry point for Context Thread Agent
4
+ """
5
+
6
+ import os
7
+ import sys
8
+ from pathlib import Path
9
+
10
+ # Add src to path for imports
11
+ sys.path.insert(0, str(Path(__file__).parent / "src"))
12
+
13
+ # Import and run the Gradio app
14
+ from ui.app import create_gradio_app
15
+
16
+ if __name__ == "__main__":
17
+ # Create and launch the app
18
+ demo = create_gradio_app()
19
+
20
+ # Launch for HF Spaces (they handle port and host)
21
+ demo.launch(
22
+ server_name="0.0.0.0",
23
+ server_port=int(os.environ.get("PORT", 7860)),
24
+ show_error=True
25
+ )