Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -31,73 +31,25 @@ PRODUCT_SCOPES = {
|
|
| 31 |
"π Azure OpenAI Service": ['AzureAIServices.ReadWrite.All']
|
| 32 |
}
|
| 33 |
|
| 34 |
-
#
|
| 35 |
products = {
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
-
|
| 43 |
-
|
| 44 |
-
"
|
| 45 |
-
|
| 46 |
-
|
| 47 |
-
|
| 48 |
-
"
|
| 49 |
-
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
|
| 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]({
|
| 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']:
|