msmaje commited on
Commit
25a1eaf
·
verified ·
1 Parent(s): 7cd9b93

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -4
app.py CHANGED
@@ -356,7 +356,7 @@ def answer_question(question):
356
 
357
  def get_device_info():
358
  """Simple function to detect if mobile (basic detection)"""
359
- return
360
  <script>
361
  function isMobile() {
362
  return window.innerWidth <= 768;
@@ -375,12 +375,13 @@ def get_device_info():
375
  window.addEventListener('resize', adjustLayout);
376
  adjustLayout();
377
  </script>
 
378
 
379
  def create_interface():
380
  """Create the fully responsive Gradio interface"""
381
 
382
  # Custom CSS for better responsiveness
383
- custom_css =
384
  /* Base responsive styles */
385
  .gradio-container {
386
  max-width: 100% !important;
@@ -526,12 +527,12 @@ def create_interface():
526
 
527
  # Check for pre-loaded PDFs
528
  if PRELOADED_PDFS:
529
- gr.Markdown(
530
  <div style="background: linear-gradient(90deg, #10b981, #059669);
531
  color: white; padding: 12px; border-radius: 8px; margin: 10px 0;">
532
  🎉 <strong>Pre-loaded PDFs detected!</strong> Use the 'Load Pre-existing PDFs' button to get started quickly.
533
  </div>
534
- )
535
 
536
  # Main layout - responsive columns
537
  with gr.Row():
 
356
 
357
  def get_device_info():
358
  """Simple function to detect if mobile (basic detection)"""
359
+ return """
360
  <script>
361
  function isMobile() {
362
  return window.innerWidth <= 768;
 
375
  window.addEventListener('resize', adjustLayout);
376
  adjustLayout();
377
  </script>
378
+ """
379
 
380
  def create_interface():
381
  """Create the fully responsive Gradio interface"""
382
 
383
  # Custom CSS for better responsiveness
384
+ custom_css = """
385
  /* Base responsive styles */
386
  .gradio-container {
387
  max-width: 100% !important;
 
527
 
528
  # Check for pre-loaded PDFs
529
  if PRELOADED_PDFS:
530
+ gr.Markdown("""
531
  <div style="background: linear-gradient(90deg, #10b981, #059669);
532
  color: white; padding: 12px; border-radius: 8px; margin: 10px 0;">
533
  🎉 <strong>Pre-loaded PDFs detected!</strong> Use the 'Load Pre-existing PDFs' button to get started quickly.
534
  </div>
535
+ """)
536
 
537
  # Main layout - responsive columns
538
  with gr.Row():