joaomorossini commited on
Commit
3a55902
·
1 Parent(s): 2d49659

Update README.md to correct demo command and add app.py for Gradio interface

Browse files
Files changed (3) hide show
  1. README.md +5 -1
  2. app.py +16 -0
  3. app/__init__.py +0 -0
README.md CHANGED
@@ -66,7 +66,11 @@ agency_swarm_demo/
66
  ```
67
  4. Run the demo:
68
  ```
69
- gradio app/demo.py
 
 
 
 
70
  ```
71
 
72
  ## Purpose
 
66
  ```
67
  4. Run the demo:
68
  ```
69
+ gradio app.py
70
+ ```
71
+ or simply:
72
+ ```
73
+ python app.py
74
  ```
75
 
76
  ## Purpose
app.py ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import sys
3
+
4
+ # Add the app directory to the path so it can find its own modules
5
+ app_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "app")
6
+ sys.path.append(app_dir)
7
+
8
+ # Import the main function from demo.py
9
+ from demo import main
10
+
11
+ # This creates and launches the Gradio interface
12
+ demo = main()
13
+
14
+ # For Gradio compatibility - expose the demo interface
15
+ if __name__ == "__main__":
16
+ demo.launch()
app/__init__.py ADDED
File without changes