forked from spencerkinney/VM-Orchestrator
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvm2_processing.py
More file actions
86 lines (75 loc) · 3.16 KB
/
vm2_processing.py
File metadata and controls
86 lines (75 loc) · 3.16 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
import os
from dotenv import load_dotenv
from orgo import Computer
# Load environment variables
load_dotenv()
class ProcessingVM:
def __init__(self):
self.api_key = os.getenv('ORGO_API_KEY')
self.computer = Computer(project_id="=yourcomputerid", api_key=self.api_key)
print("⚙️ Processing VM (VM2) initialized!")
def data_analysis_task(self, topic):
"""Analyze data and create visualizations"""
print(f"⚙️ Starting data analysis for: {topic}")
prompt = f"""
Data analysis and visualization for {topic}:
1. Open spreadsheet application (Numbers, Excel, or Google Sheets)
2. Create a comprehensive data analysis with:
- Market size data
- Growth trends over time
- Geographic distribution
- Key performance metrics
3. Add charts and graphs:
- Bar charts for comparisons
- Line graphs for trends
- Pie charts for market share
4. Create pivot tables for deeper analysis
5. Export final analysis as 'analysis_{topic.replace(' ', '_')}.xlsx'
"""
self.computer.prompt(prompt)
print(f"✅ Data analysis for {topic} completed!")
def financial_modeling(self, business_type):
"""Create financial models and projections"""
prompt = f"""
Financial modeling for {business_type}:
1. Open spreadsheet application
2. Create financial model including:
- Revenue projections (3-year forecast)
- Cost analysis
- Profit & Loss statements
- Cash flow projections
- Break-even analysis
3. Add sensitivity analysis with different scenarios
4. Create charts showing financial trends
5. Save as 'financial_model_{business_type.replace(' ', '_')}.xlsx'
"""
self.computer.prompt(prompt)
print(f"✅ Financial modeling for {business_type} completed!")
def content_processing(self, content_type):
"""Process and organize content"""
prompt = f"""
Content processing for {content_type}:
1. Open text editor or word processor
2. Create structured content including:
- Executive summary
- Key findings organized by categories
- Action items and recommendations
- Timeline for implementation
3. Format document professionally with headers and bullet points
4. Create a separate summary document (1-page)
5. Save both as 'processed_{content_type.replace(' ', '_')}.docx' and 'summary_{content_type.replace(' ', '_')}.docx'
"""
self.computer.prompt(prompt)
print(f"✅ Content processing for {content_type} completed!")
def cleanup(self):
self.computer.destroy()
print("🧹 Processing VM cleaned up!")
if __name__ == "__main__":
vm = ProcessingVM()
try:
# Example processing tasks
vm.data_analysis_task("cryptocurrency market")
# vm.financial_modeling("tech startup")
# vm.content_processing("market research report")
finally:
vm.cleanup()