-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathREADME.txt
More file actions
221 lines (176 loc) · 6.13 KB
/
README.txt
File metadata and controls
221 lines (176 loc) · 6.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
# 🦋 Butterfly AI - Intelligent News Analysis Application
## Overview
Butterfly AI is a sophisticated news analysis application that leverages artificial intelligence to help users understand the cascading effects of news events. By analyzing news from multiple sources, the platform predicts potential "butterfly effects" - how small events today might create significant changes tomorrow.
## 🌟 Key Features
### News Intelligence
- **Multi-Source Aggregation**: Collects news from major sources (NewsAPI, Guardian, CNN, BBC, Baidu, Toutiao)
- **Smart Categorization**: Automatically organizes news into relevant categories
- **Multi-Language Support**: Handles both English and Chinese content
- **Real-Time Updates**: Continuous news monitoring and analysis
### Advanced Analysis
- **🦋 Butterfly Effect Prediction**: AI-powered analysis of potential chain reactions
- **🌍 Geographic Impact**: Visualization of how events ripple across regions
- **📊 Context Analysis**: Historical timelines and related events
- **👥 Stakeholder Analysis**: Key entities and their relationships
- **💡 Action Items**: Practical recommendations based on news events
- **📈 Company Impact**: Assessment of business implications
### Personalization
- **Interest Tracking**: Customizable interest categories
- **Company Watchlists**: Monitor specific organizations
- **Smart Filters**: Content filtering based on user preferences
- **Custom Analysis**: Upload and analyze your own documents
### 📄 Document Analysis System
- **Multi-Format Support**:
- PDF documents
- Microsoft Office files (DOCX, XLSX, PPTX)
- Text files
- More formats coming soon
- **Analysis Capabilities**:
```dart
final List<String> _analysisSteps = [
'Analyzing the cause...',
'Analyzing the butterfly effect...',
'Identifying the key stake holders...',
'Figuring out the relevant action items for you...',
];
```
- **Dual Analysis Interface**:
- Direct text input panel for quick analysis
- File explorer for document selection
- Cross-platform file system navigation
- Analysis history tracking
- **Platform-Specific Optimization**:
```dart
// Handles different platforms appropriately
if (Platform.isWindows) {
// Windows-specific directory handling
} else if (Platform.isMacOS) {
// macOS-specific directory handling
} else if (Platform.isAndroid) {
// Android-specific directory handling
}
```
- **Real-Time Analysis Feedback**:
- Progressive analysis status updates
- Rotating status messages
- Error handling and user notifications
- Analysis result visualization
## 🛠 Technical Architecture
### Backend (Python/Flask)
- News crawling and aggregation
- Content processing and categorization
- AI-powered analysis using LLM services
- Image generation for news stories
- REST API endpoints for client interaction
### Frontend (Flutter)
- Cross-platform support (Android, iOS, desktop)
- Rich interactive UI for news browsing
- Detailed news visualization with cards for different analysis aspects
- File analysis capabilities for various formats (PDF, DOC, TXT, etc.)
- Offline storage and synchronization
## 📋 Requirements
### Backend Requirements
- Python 3.8+
- OpenAI API key
- NewsAPI key
- Required Python packages (see requirements.txt)
### Frontend Requirements
- Flutter 3.0+
- Dart 2.17+
## 🚀 Installation & Setup
### Backend Setup
1. Clone the repository
```bash
git clone https://github.com/yourusername/butterfly-ai.git
cd butterfly-ai/butterfly_server
```
2. Install dependencies
```bash
pip install -r requirements.txt
```
3. Configure environment variables
```bash
cp .env.example .env
# Edit .env with your API keys and configuration
```
4. Run the server
```bash
python -m flask run
```
### Frontend Setup
1. Navigate to the Flutter project
```bash
cd butterfly_apps
```
2. Get dependencies
```bash
flutter pub get
```
3. Run the application
```bash
flutter run
```
## 💡 Key Components
### Smart Content Processing
- Automatic categorization of news
- Full-text content extraction
- Image handling and caching
- Multi-format document support
### Analysis Visualization
- Timeline views for historical context
- Geographic impact maps
- Cause-and-effect chains
- Action item recommendations
- Company impact assessments
### User Experience
- Clean, intuitive interface
- Real-time news updates
- Offline access to downloaded content
- Cross-platform consistency
- Personalized content delivery
## 👥 Target Users
- Business professionals needing strategic insights
- Researchers analyzing news patterns
- Investors tracking market impacts
- General users interested in understanding complex news relationships
- Anyone wanting to understand the broader implications of current events
## 📱 Usage
1. **Initial Setup**
- Launch the application
- Configure your interests and preferences
- Add companies to your watchlist (optional)
2. **News Browsing**
- Browse categorized news feed
- Click on articles for detailed analysis
- View butterfly effect predictions
3. **Custom Analysis**
- Upload documents for analysis
- View personalized insights
- Track specific topics or companies
4. **Document Analysis**
- Upload documents through the file explorer
- Input text directly for quick analysis
- View analysis history
- Export analysis results
- Track analysis progress in real-time
## 🤝 Contributing
We welcome contributions! Please follow these steps:
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## 🙏 Acknowledgments
- News data providers
- Open source libraries and tools
- AI/LLM service providers
- Community contributors
## 📞 Support
For support, please:
- Open an issue in the repository
- Contact us at [support@butterflyai.com](mailto:support@butterflyai.com)
- Join our [Discord community](https://discord.gg/butterflyai)
---
Made with ❤️ by the Butterfly AI Team