Chia Woon Yap commited on
Commit
cf4f75e
·
verified ·
1 Parent(s): 3bd47ae

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -24
app.py CHANGED
@@ -283,30 +283,30 @@ def tutor_ai_chatbot():
283
  gr.Markdown("# 📚 AI Tutor - We.(POC)")
284
  gr.Markdown("An interactive Personal AI Tutor chatbot to help with your learning needs.")
285
 
286
- # Chatbot Tab
287
- with gr.Tab("AI Chatbot"):
288
- with gr.Row():
289
- with gr.Column(scale=3):
290
- chatbot = gr.Chatbot(height=500, type="messages")
291
-
292
- with gr.Column(scale=1):
293
- audio_playback = gr.Audio(label="Audio Response", type="filepath")
294
-
295
- # Move the input controls here to span full width
296
- with gr.Row():
297
- msg = gr.Textbox(
298
- label="Ask a question",
299
- placeholder="Type your question here...",
300
- container=False # Removes the default container styling
301
- )
302
- submit = gr.Button("Send")
303
-
304
- with gr.Row():
305
- with gr.Column(scale=1):
306
- audio_input = gr.Audio(type="numpy", label="Record or Upload Audio")
307
-
308
- # Clear chat history button
309
- clear_btn = gr.Button("Clear Chat")
310
 
311
  # ... rest of your event handlers remain the same
312
 
 
283
  gr.Markdown("# 📚 AI Tutor - We.(POC)")
284
  gr.Markdown("An interactive Personal AI Tutor chatbot to help with your learning needs.")
285
 
286
+ # Chatbot Tab
287
+ with gr.Tab("AI Chatbot"):
288
+ with gr.Row():
289
+ with gr.Column(scale=3):
290
+ chatbot = gr.Chatbot(height=500, type="messages")
291
+
292
+ with gr.Column(scale=1):
293
+ audio_playback = gr.Audio(label="Audio Response", type="filepath")
294
+
295
+ # Move the input controls here to span full width
296
+ with gr.Row():
297
+ msg = gr.Textbox(
298
+ label="Ask a question",
299
+ placeholder="Type your question here...",
300
+ container=False # Removes the default container styling
301
+ )
302
+ submit = gr.Button("Send")
303
+
304
+ with gr.Row():
305
+ with gr.Column(scale=1):
306
+ audio_input = gr.Audio(type="numpy", label="Record or Upload Audio")
307
+
308
+ # Clear chat history button
309
+ clear_btn = gr.Button("Clear Chat")
310
 
311
  # ... rest of your event handlers remain the same
312