chrissoria Claude Sonnet 4.5 commited on
Commit
6924d73
·
1 Parent(s): a9a767c

Solution 3: Force 1200px viewport with 0.33 scale for desktop rendering

Browse files

- Set viewport to fixed 1200px width (desktop size)
- Scale down to 0.33 to fit on mobile screens
- Forces browser to render as desktop, bypassing mobile detection
- Testing if this makes Gradio tabs work on mobile

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -1339,9 +1339,9 @@ function() {
1339
  }
1340
  """
1341
 
1342
- # Standard viewport - works on all devices
1343
  custom_head = """
1344
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=5.0, user-scalable=yes">
1345
  """
1346
 
1347
  with gr.Blocks(title="CatLLM - Research Data Classifier", theme=gr.themes.Soft(), css=custom_css, js=custom_js, head=custom_head) as demo:
 
1339
  }
1340
  """
1341
 
1342
+ # Force desktop viewport - 1200px width scaled down to fit mobile
1343
  custom_head = """
1344
+ <meta name="viewport" content="width=1200, initial-scale=0.33, minimum-scale=0.33, maximum-scale=5.0, user-scalable=yes">
1345
  """
1346
 
1347
  with gr.Blocks(title="CatLLM - Research Data Classifier", theme=gr.themes.Soft(), css=custom_css, js=custom_js, head=custom_head) as demo: