maria355 commited on
Commit
20b6588
·
verified ·
1 Parent(s): 27c1dd1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +82 -1
app.py CHANGED
@@ -1127,9 +1127,90 @@ def add_agentic_ai_info():
1127
 
1128
  Agentic AI represents an evolution from AI as a passive tool to AI as an active collaborator that can work independently while remaining aligned with human goals and values.
1129
  """
 
1130
  def create_chatbot():
1131
  """Create the Gradio interface for the chatbot"""
1132
- with gr.Blocks() as demo:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1133
  gr.HTML("<div id='title'>🎓 AI Teaching Assistant</div>")
1134
  gr.HTML("<div id='subtitle'>Your personalized learning companion for Python, Data Science & AI</div>")
1135
 
 
1127
 
1128
  Agentic AI represents an evolution from AI as a passive tool to AI as an active collaborator that can work independently while remaining aligned with human goals and values.
1129
  """
1130
+
1131
  def create_chatbot():
1132
  """Create the Gradio interface for the chatbot"""
1133
+ # Generate a random session ID for the user
1134
+ session_id = str(uuid.uuid4())
1135
+
1136
+ # Define theme colors and styling
1137
+ primary_color = "#4a6fa5"
1138
+ secondary_color = "#6c757d"
1139
+ success_color = "#28a745"
1140
+ light_color = "#f8f9fa"
1141
+ dark_color = "#343a40"
1142
+
1143
+ custom_css = f"""
1144
+ :root {{
1145
+ --primary-color: {primary_color};
1146
+ --secondary-color: {secondary_color};
1147
+ --success-color: {success_color};
1148
+ --light-color: {light_color};
1149
+ --dark-color: {dark_color};
1150
+ }}
1151
+ .gradio-container {{
1152
+ background-color: var(--light-color);
1153
+ font-family: 'Inter', 'Segoe UI', sans-serif;
1154
+ }}
1155
+ #title {{
1156
+ font-size: 32px;
1157
+ font-wedef create_chatbot()ight: bold;
1158
+ text-align: center;
1159
+ padding-top: 20px;
1160
+ color: var(--primary-color);
1161
+ margin-bottom: 0;
1162
+ }}
1163
+ #subtitle {{
1164
+ font-size: 18px;
1165
+ text-align: center;
1166
+ margin-bottom: 20px;
1167
+ color: var(--secondary-color);
1168
+ }}
1169
+ .card {{
1170
+ background-color: white;
1171
+ padding: 20px;
1172
+ border-radius: 12px;
1173
+ box-shadow: 0 4px 10px rgba(0,0,0,0.08);
1174
+ margin-bottom: 20px;
1175
+ }}
1176
+ .tabs {{
1177
+ margin-top: 20px;
1178
+ }}
1179
+ .gr-button-primary {{
1180
+ background-color: var(--primary-color) !important;
1181
+ }}
1182
+ .gr-button-secondary {{
1183
+ background-color: var(--secondary-color) !important;
1184
+ }}
1185
+ .gr-button-success {{
1186
+ background-color: var(--success-color) !important;
1187
+ }}
1188
+ .footer {{
1189
+ text-align: center;
1190
+ margin-top: 30px;
1191
+ padding: 10px;
1192
+ font-size: 14px;
1193
+ color: var(--secondary-color);
1194
+ }}
1195
+ .progress-module {{
1196
+ padding: 10px;
1197
+ margin: 5px 0;
1198
+ border-radius: 5px;
1199
+ background-color: #e9ecef;
1200
+ }}
1201
+ .progress-module.completed {{
1202
+ background-color: #d4edda;
1203
+ }}
1204
+ .info-box {{
1205
+ background-color: #e7f5fe;
1206
+ border-left: 4px solid var(--primary-color);
1207
+ padding: 15px;
1208
+ margin: 15px 0;
1209
+ border-radius: 4px;
1210
+ }}
1211
+ """
1212
+
1213
+ with gr.Blocks(css=custom_css, theme=gr.themes.Soft(primary_hue="blue")) as demo:
1214
  gr.HTML("<div id='title'>🎓 AI Teaching Assistant</div>")
1215
  gr.HTML("<div id='subtitle'>Your personalized learning companion for Python, Data Science & AI</div>")
1216