awacke1 commited on
Commit
23945b9
Β·
verified Β·
1 Parent(s): 9445ce6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -67
app.py CHANGED
@@ -31,73 +31,25 @@ PRODUCT_SCOPES = {
31
  "πŸ”— Azure OpenAI Service": ['AzureAIServices.ReadWrite.All']
32
  }
33
 
34
- # AI capabilities and Graph API information
35
  products = {
36
- "πŸ“§ Outlook": {
37
- "ai_capabilities": "Copilot for enhanced email writing, calendar management, and scheduling.",
38
- "graph_api": "Access to mail, calendar, contacts, and events."
39
- },
40
- "πŸ“’ OneNote": {
41
- "ai_capabilities": "Content suggestion, note organization, and OCR for extracting text from images.",
42
- "graph_api": "Manage notebooks, sections, and pages."
43
- },
44
- "πŸ“Š Excel": {
45
- "ai_capabilities": "Copilot for advanced data analysis, data insights, and formula generation.",
46
- "graph_api": "Create and manage worksheets, tables, charts, and workbooks."
47
- },
48
- "πŸ“„ Word": {
49
- "ai_capabilities": "Copilot for document drafting, summarization, and grammar improvements.",
50
- "graph_api": "Document content access, templates, and file management."
51
- },
52
- "πŸ—ƒοΈ SharePoint": {
53
- "ai_capabilities": "Intelligent search, document tagging, and metadata extraction.",
54
- "graph_api": "Access to sites, lists, files, and document libraries."
55
- },
56
- "πŸ“… Teams": {
57
- "ai_capabilities": "Copilot for meeting summaries, transcription, and chat suggestions.",
58
- "graph_api": "Manage chats, teams, channels, and meetings."
59
- },
60
- "πŸ’¬ Viva": {
61
- "ai_capabilities": "Personalized learning insights, well-being insights, and productivity suggestions.",
62
- "graph_api": "Access to user analytics and learning modules."
63
- },
64
- "πŸš€ Power Platform": {
65
- "ai_capabilities": "Automation with AI Builder, data insights, and custom AI models.",
66
- "graph_api": "Automation workflows, app creation, and data visualization."
67
- },
68
- "🧠 Copilot": {
69
- "ai_capabilities": "Embedded across Word, Excel, Outlook, Teams, and more for AI-driven productivity.",
70
- "graph_api": "Underpins Copilot's access to data and integrations."
71
- },
72
- "πŸ—‚οΈ OneDrive": {
73
- "ai_capabilities": "Intelligent file organization and search.",
74
- "graph_api": "File and folder access, sharing, and metadata."
75
- },
76
- "πŸ’‘ PowerPoint": {
77
- "ai_capabilities": "Design suggestions, presentation summarization, and speaker coaching.",
78
- "graph_api": "Presentation creation, slide management, and templates."
79
- },
80
- "πŸ“š Microsoft Bookings": {
81
- "ai_capabilities": "Automated scheduling and reminders.",
82
- "graph_api": "Booking calendars, services, and appointment details."
83
- },
84
- "πŸ““ Loop": {
85
- "ai_capabilities": "Real-time collaboration and content suggestions.",
86
- "graph_api": "Access to shared workspaces and collaborative pages."
87
- },
88
- "πŸ—£οΈ Translator": {
89
- "ai_capabilities": "Real-time language translation and text-to-speech.",
90
- "graph_api": "Integrated into communication and translation services."
91
- },
92
- "πŸ“‹ To Do & Planner": {
93
- "ai_capabilities": "Task prioritization and smart reminders.",
94
- "graph_api": "Task creation, management, and synchronization."
95
- },
96
- "πŸ”— Azure OpenAI Service": {
97
- "ai_capabilities": "Access to GPT models for custom AI implementations.",
98
- "graph_api": "Used indirectly for building custom AI models into workflows."
99
- }
100
- }
101
 
102
  BASE_SCOPES = ['User.Read']
103
 
@@ -147,7 +99,7 @@ def make_api_call(access_token, endpoint, method='GET', data=None):
147
  # Define product integration handlers
148
  def handle_outlook_integration(access_token):
149
  st.subheader("πŸ“§ Outlook Integration")
150
- st.markdown(f"[Open Outlook]({PRODUCT_SCOPES['πŸ“§ Outlook']['link']})")
151
  emails = make_api_call(access_token, 'me/messages?$top=10&$orderby=receivedDateTime desc')
152
  if emails and 'value' in emails:
153
  for email in emails['value']:
 
31
  "πŸ”— Azure OpenAI Service": ['AzureAIServices.ReadWrite.All']
32
  }
33
 
34
+ # Add links to the products dictionary
35
  products = {
36
+ "πŸ“§ Outlook": {
37
+ "ai_capabilities": "Copilot for enhanced email writing, calendar management, and scheduling.",
38
+ "graph_api": "Access to mail, calendar, contacts, and events.",
39
+ "link": "https://outlook.office.com/mail/"
40
+ },
41
+ "πŸ“’ OneNote": {
42
+ "ai_capabilities": "Content suggestion, note organization, and OCR for extracting text from images.",
43
+ "graph_api": "Manage notebooks, sections, and pages.",
44
+ "link": "https://www.onenote.com/"
45
+ },
46
+ "πŸ“Š Excel": {
47
+ "ai_capabilities": "Copilot for advanced data analysis, data insights, and formula generation.",
48
+ "graph_api": "Create and manage worksheets, tables, charts, and workbooks.",
49
+ "link": "https://www.office.com/excel"
50
+ },
51
+ # Add links for other products as needed...
52
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
  BASE_SCOPES = ['User.Read']
55
 
 
99
  # Define product integration handlers
100
  def handle_outlook_integration(access_token):
101
  st.subheader("πŸ“§ Outlook Integration")
102
+ st.markdown(f"[Open Outlook]({products['πŸ“§ Outlook']['link']})") # Use products dictionary for link
103
  emails = make_api_call(access_token, 'me/messages?$top=10&$orderby=receivedDateTime desc')
104
  if emails and 'value' in emails:
105
  for email in emails['value']: