James Frecheville commited on
Commit
0354298
·
1 Parent(s): 1a66d79

Initial commit for Hugging Face Spaces deployment

Browse files
Files changed (6) hide show
  1. .gitignore +13 -11
  2. README.md +54 -0
  3. app.py +4 -0
  4. owl/webapp.py +1 -1
  5. requirements.txt +14 -3
  6. setup.sh +61 -0
.gitignore CHANGED
@@ -6,9 +6,10 @@ __pycache__/
6
  *$py.class
7
  *.so
8
  .Python
 
9
  build/
10
  develop-eggs/
11
- .dist
12
  downloads/
13
  eggs/
14
  .eggs/
@@ -24,19 +25,25 @@ wheels/
24
 
25
  # Virtual Environment
26
  venv/
27
- env/
28
  ENV/
29
- .env
30
-
31
- # Runtime Temporary files
32
- tmp/
33
 
34
  # IDE
35
  .idea/
36
  .vscode/
37
  *.swp
38
  *.swo
 
 
 
 
 
 
 
 
 
 
39
  .DS_Store
 
40
 
41
  # Project specific
42
  owl/data
@@ -44,11 +51,6 @@ owl/tmp
44
  owl/.env
45
  owl/utils/__pycache__/
46
 
47
- # Logs
48
- *.log
49
- logs/
50
- log/
51
-
52
  # Coverage reports
53
  htmlcov/
54
  .tox/
 
6
  *$py.class
7
  *.so
8
  .Python
9
+ env/
10
  build/
11
  develop-eggs/
12
+ dist/
13
  downloads/
14
  eggs/
15
  .eggs/
 
25
 
26
  # Virtual Environment
27
  venv/
 
28
  ENV/
 
 
 
 
29
 
30
  # IDE
31
  .idea/
32
  .vscode/
33
  *.swp
34
  *.swo
35
+
36
+ # Logs
37
+ *.log
38
+ logs/
39
+
40
+ # Environment variables
41
+ .env
42
+ .env.*
43
+
44
+ # OS
45
  .DS_Store
46
+ Thumbs.db
47
 
48
  # Project specific
49
  owl/data
 
51
  owl/.env
52
  owl/utils/__pycache__/
53
 
 
 
 
 
 
54
  # Coverage reports
55
  htmlcov/
56
  .tox/
README.md CHANGED
@@ -1,3 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <h1 align="center">
2
  🦉 OWL: Optimized Workforce Learning for General Multi-Agent Assistance in Real-World Task Automation
3
  </h1>
 
1
+ # 🦉 OWL Multi-Agent Collaboration System
2
+
3
+ OWL is an advanced multi-agent collaboration system developed based on the CAMEL framework, designed to solve complex problems through agent collaboration.
4
+
5
+ ## Features
6
+
7
+ - Multi-agent collaboration system
8
+ - Web-based interface
9
+ - Support for various AI models (OpenAI, Qwen, DeepSeek, etc.)
10
+ - Environment variable management
11
+ - Real-time conversation logging
12
+ - Interactive UI with Gradio
13
+
14
+ ## Setup
15
+
16
+ 1. Clone the repository
17
+ 2. Install dependencies:
18
+ ```bash
19
+ pip install -r requirements.txt
20
+ ```
21
+ 3. Copy the environment template:
22
+ ```bash
23
+ cp owl/.env_template owl/.env
24
+ ```
25
+ 4. Configure your API keys in the `.env` file
26
+ 5. Run the application:
27
+ ```bash
28
+ python app.py
29
+ ```
30
+
31
+ ## Environment Variables
32
+
33
+ The following environment variables are required:
34
+
35
+ - `OPENAI_API_KEY`: Your OpenAI API key
36
+ - `GOOGLE_API_KEY`: Your Google API key
37
+ - `SEARCH_ENGINE_ID`: Your Google Search Engine ID
38
+ - `CHUNKR_API_KEY`: Your Chunkr API key
39
+ - `FIRECRAWL_API_KEY`: Your Firecrawl API key
40
+
41
+ Optional variables for alternative models:
42
+ - `QWEN_API_KEY`: For Qwen model
43
+ - `DEEPSEEK_API_KEY`: For DeepSeek model
44
+ - `GROQ_API_KEY`: For GROQ model
45
+ - Azure OpenAI API keys
46
+
47
+ ## License
48
+
49
+ Based on Apache License 2.0 open source license
50
+
51
+ ## Credits
52
+
53
+ © 2025 CAMEL-AI.org
54
+
55
  <h1 align="center">
56
  🦉 OWL: Optimized Workforce Learning for General Multi-Agent Assistance in Real-World Task Automation
57
  </h1>
app.py ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ from owl.webapp import main
2
+
3
+ if __name__ == "__main__":
4
+ main()
owl/webapp.py CHANGED
@@ -1294,7 +1294,7 @@ def main():
1294
  app = create_ui()
1295
 
1296
  app.queue()
1297
- app.launch(share=False, favicon_path="../assets/owl-favicon.ico")
1298
  except Exception as e:
1299
  logging.error(f"Error occurred while starting the application: {str(e)}")
1300
  print(f"Error occurred while starting the application: {str(e)}")
 
1294
  app = create_ui()
1295
 
1296
  app.queue()
1297
+ app.launch(share=True, server_name="0.0.0.0", server_port=7861, favicon_path="../assets/owl-favicon.ico")
1298
  except Exception as e:
1299
  logging.error(f"Error occurred while starting the application: {str(e)}")
1300
  print(f"Error occurred while starting the application: {str(e)}")
requirements.txt CHANGED
@@ -1,4 +1,15 @@
1
- camel-ai[all]==0.2.36
2
- chunkr-ai>=0.0.41
3
- docx2markdown>=0.1.1
4
  gradio>=3.50.2
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  gradio>=3.50.2
2
+ docx2markdown>=0.1.1
3
+ chunkr-ai>=0.0.41
4
+ camel-ai[all]==0.2.36
5
+ python-dotenv>=1.0.0
6
+ openai>=1.59.7
7
+ httpx>=0.28.0
8
+ pydantic>=1.9
9
+ numpy>=1.26.0
10
+ tiktoken>=0.7.0
11
+ pyyaml>=6.0.2
12
+ colorama>=0.4.6
13
+ psutil>=5.9.8
14
+ docstring-parser>=0.15
15
+ jsonschema>=4.0.0
setup.sh ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/bin/bash
2
+
3
+ # Script to automate running OWL locally on a Mac
4
+
5
+ # Check if Python 3 is installed and check version compatibility
6
+ echo "Checking Python version..."
7
+ PYTHON_VERSION=$(python3 --version 2>&1)
8
+ if [[ "$PYTHON_VERSION" =~ "Python 3" ]]; then
9
+ echo "Python found: $PYTHON_VERSION"
10
+ # Extract version numbers
11
+ VERSION_NUM=$(echo $PYTHON_VERSION | cut -d' ' -f2)
12
+ MAJOR=$(echo $VERSION_NUM | cut -d. -f1)
13
+ MINOR=$(echo $VERSION_NUM | cut -d. -f2)
14
+
15
+ if [ "$MAJOR" -eq 3 ] && [ "$MINOR" -ge 10 ] && [ "$MINOR" -lt 13 ]; then
16
+ echo "Python version is compatible!"
17
+ else
18
+ echo "Error: OWL requires Python version >=3.10 and <3.13"
19
+ echo "Your version ($VERSION_NUM) is not compatible."
20
+ echo ""
21
+ echo "Please install Python 3.10 using one of these methods:"
22
+ echo "1. Download from python.org/downloads/"
23
+ echo "2. Using Homebrew:"
24
+ echo " a. Install Homebrew first (if not installed):"
25
+ echo " /bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\""
26
+ echo " b. Then install Python 3.10:"
27
+ echo " brew install [email protected]"
28
+ echo ""
29
+ echo "After installing, run this script again using the correct Python version:"
30
+ echo "python3.10 setup.sh"
31
+ exit 1
32
+ fi
33
+ else
34
+ echo "Python 3 not found! Please install it from python.org/downloads/ and rerun this script."
35
+ exit 1
36
+ fi
37
+
38
+ # Create and activate virtual environment
39
+ echo "Setting up Python virtual environment..."
40
+ python3 -m venv venv
41
+ source venv/bin/activate || { echo "Failed to activate virtual environment!"; exit 1; }
42
+
43
+ # Install dependencies
44
+ echo "Installing dependencies from requirements.txt..."
45
+ if [ -f "requirements.txt" ]; then
46
+ pip3 install -r requirements.txt || { echo "Failed to install dependencies!"; exit 1; }
47
+ else
48
+ echo "No requirements.txt found! Cannot continue."
49
+ exit 1
50
+ fi
51
+
52
+ # Run OWL
53
+ echo "Attempting to run OWL..."
54
+ if [ -f "owl/webapp.py" ]; then
55
+ python3 owl/webapp.py
56
+ else
57
+ echo "Could not find owl/webapp.py! Please check the repository structure."
58
+ exit 1
59
+ fi
60
+
61
+ echo "If you see errors, copy them and ask for help!"