Spaces:
Running
Running
Update BestYet.app.py
Browse files- BestYet.app.py +111 -7
BestYet.app.py
CHANGED
@@ -11,13 +11,116 @@ CLIENT_SECRET_KEY = os.getenv('CLIENT_SECRET_KEY')
|
|
11 |
AUTHORITY_URL = 'https://login.microsoftonline.com/common'
|
12 |
REDIRECT_URI = 'https://huggingface.co/spaces/awacke1/MSGraphAPI'
|
13 |
|
14 |
-
# Define product to scope mapping and
|
15 |
PRODUCT_SCOPES = {
|
16 |
-
"π§ Outlook": {
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
}
|
22 |
|
23 |
BASE_SCOPES = ['User.Read']
|
@@ -242,4 +345,5 @@ def main():
|
|
242 |
st.write("No products selected. Please select products from the sidebar.")
|
243 |
|
244 |
if __name__ == "__main__":
|
245 |
-
main()
|
|
|
|
11 |
AUTHORITY_URL = 'https://login.microsoftonline.com/common'
|
12 |
REDIRECT_URI = 'https://huggingface.co/spaces/awacke1/MSGraphAPI'
|
13 |
|
14 |
+
# Define product to scope mapping, links, AI capabilities, and Graph solutions
|
15 |
PRODUCT_SCOPES = {
|
16 |
+
"π§ Outlook": {
|
17 |
+
'scopes': ['Mail.Read', 'Mail.Send'],
|
18 |
+
'link': 'https://outlook.office.com/mail/',
|
19 |
+
'ai_capabilities': "π€βοΈ Smart email & scheduling",
|
20 |
+
'graph_solution': "π¨π
Mail, calendar & contacts API"
|
21 |
+
},
|
22 |
+
"π
Calendar": {
|
23 |
+
'scopes': ['Calendars.ReadWrite'],
|
24 |
+
'link': 'https://outlook.office.com/calendar/',
|
25 |
+
'ai_capabilities': "π€π
Smart scheduling & reminders",
|
26 |
+
'graph_solution': "π
Calendar management API"
|
27 |
+
},
|
28 |
+
"π Tasks": {
|
29 |
+
'scopes': ['Tasks.ReadWrite'],
|
30 |
+
'link': 'https://to-do.office.com/tasks/',
|
31 |
+
'ai_capabilities': "π€π Task prioritization",
|
32 |
+
'graph_solution': "β
Task management API"
|
33 |
+
},
|
34 |
+
"ποΈ OneDrive": {
|
35 |
+
'scopes': ['Files.ReadWrite.All'],
|
36 |
+
'link': 'https://onedrive.live.com/',
|
37 |
+
'ai_capabilities': "π€π Smart file organization",
|
38 |
+
'graph_solution': "π File & folder API"
|
39 |
+
},
|
40 |
+
"π OneNote": {
|
41 |
+
'scopes': ['Notes.Read', 'Notes.Create'],
|
42 |
+
'link': 'https://www.onenote.com/notebooks',
|
43 |
+
'ai_capabilities': "π€π Content suggestion & OCR",
|
44 |
+
'graph_solution': "π Notebook & page API"
|
45 |
+
},
|
46 |
+
"π Excel": {
|
47 |
+
'scopes': ['Files.ReadWrite.All'],
|
48 |
+
'link': 'https://www.office.com/launch/excel',
|
49 |
+
'ai_capabilities': "π€π Data analysis & insights",
|
50 |
+
'graph_solution': "π Workbook & chart API"
|
51 |
+
},
|
52 |
+
"π Word": {
|
53 |
+
'scopes': ['Files.ReadWrite.All'],
|
54 |
+
'link': 'https://www.office.com/launch/word',
|
55 |
+
'ai_capabilities': "π€βοΈ Smart drafting & editing",
|
56 |
+
'graph_solution': "π Document content API"
|
57 |
+
},
|
58 |
+
"ποΈ SharePoint": {
|
59 |
+
'scopes': ['Sites.Read.All', 'Sites.ReadWrite.All'],
|
60 |
+
'link': 'https://www.microsoft.com/microsoft-365/sharepoint/collaboration',
|
61 |
+
'ai_capabilities': "π€π Smart search & tagging",
|
62 |
+
'graph_solution': "π Sites & lists API"
|
63 |
+
},
|
64 |
+
"π
Teams": {
|
65 |
+
'scopes': ['Team.ReadBasic.All', 'Channel.ReadBasic.All'],
|
66 |
+
'link': 'https://teams.microsoft.com/',
|
67 |
+
'ai_capabilities': "π€π¬ Meeting insights & summaries",
|
68 |
+
'graph_solution': "π₯ Teams & chats API"
|
69 |
+
},
|
70 |
+
"π¬ Viva": {
|
71 |
+
'scopes': ['Analytics.Read'],
|
72 |
+
'link': 'https://www.microsoft.com/microsoft-viva',
|
73 |
+
'ai_capabilities': "π€π Personalized insights",
|
74 |
+
'graph_solution': "π Analytics & learning API"
|
75 |
+
},
|
76 |
+
"π Power Platform": {
|
77 |
+
'scopes': ['Flow.Read.All'],
|
78 |
+
'link': 'https://powerplatform.microsoft.com/',
|
79 |
+
'ai_capabilities': "π€βοΈ AI-powered automation",
|
80 |
+
'graph_solution': "π§ Workflow & app API"
|
81 |
+
},
|
82 |
+
"π§ Copilot": {
|
83 |
+
'scopes': ['Cognitive.Read'],
|
84 |
+
'link': 'https://www.microsoft.com/microsoft-365/copilot',
|
85 |
+
'ai_capabilities': "π€π Cross-app AI assistance",
|
86 |
+
'graph_solution': "π§ AI integration API"
|
87 |
+
},
|
88 |
+
"π‘ PowerPoint": {
|
89 |
+
'scopes': ['Files.ReadWrite.All'],
|
90 |
+
'link': 'https://www.office.com/launch/powerpoint',
|
91 |
+
'ai_capabilities': "π€π¨ Design & coaching AI",
|
92 |
+
'graph_solution': "π Presentation API"
|
93 |
+
},
|
94 |
+
"π Microsoft Bookings": {
|
95 |
+
'scopes': ['Bookings.Read.All', 'Bookings.ReadWrite.All'],
|
96 |
+
'link': 'https://outlook.office.com/bookings/',
|
97 |
+
'ai_capabilities': "π€π
Smart scheduling",
|
98 |
+
'graph_solution': "π Booking services API"
|
99 |
+
},
|
100 |
+
"π Loop": {
|
101 |
+
'scopes': ['Files.ReadWrite.All'],
|
102 |
+
'link': 'https://loop.microsoft.com/',
|
103 |
+
'ai_capabilities': "π€π Real-time collaboration AI",
|
104 |
+
'graph_solution': "π Workspace API"
|
105 |
+
},
|
106 |
+
"π£οΈ Translator": {
|
107 |
+
'scopes': ['Translation.Read'],
|
108 |
+
'link': 'https://www.microsoft.com/translator/',
|
109 |
+
'ai_capabilities': "π€π Real-time translation",
|
110 |
+
'graph_solution': "π¨οΈ Translation services API"
|
111 |
+
},
|
112 |
+
"π To Do & Planner": {
|
113 |
+
'scopes': ['Tasks.ReadWrite'],
|
114 |
+
'link': 'https://todo.microsoft.com/',
|
115 |
+
'ai_capabilities': "π€π Smart task management",
|
116 |
+
'graph_solution': "β
Task & plan API"
|
117 |
+
},
|
118 |
+
"π Azure OpenAI Service": {
|
119 |
+
'scopes': ['AzureAIServices.ReadWrite.All'],
|
120 |
+
'link': 'https://azure.microsoft.com/products/cognitive-services/openai-service/',
|
121 |
+
'ai_capabilities': "π€π§ Custom AI model access",
|
122 |
+
'graph_solution': "π AI model integration API"
|
123 |
+
}
|
124 |
}
|
125 |
|
126 |
BASE_SCOPES = ['User.Read']
|
|
|
345 |
st.write("No products selected. Please select products from the sidebar.")
|
346 |
|
347 |
if __name__ == "__main__":
|
348 |
+
main()
|
349 |
+
|