cstr commited on
Commit
7136934
Β·
verified Β·
1 Parent(s): 558d6bc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +26 -5
app.py CHANGED
@@ -15,11 +15,11 @@ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(
15
 
16
  # Constants
17
  CONTEXT_SIZES = {
18
- "4K": 4000,
19
- "8K": 8000,
20
- "32K": 32000,
21
- "128K": 128000,
22
- "200K": 200000
23
  }
24
 
25
  MODEL_CONTEXT_SIZES = {
@@ -371,6 +371,27 @@ with gr.Blocks(theme=gr.themes.Default()) as demo:
371
  # State variables
372
  pdf_content = gr.State("")
373
  snippets = gr.State([])
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
374
 
375
  # Header
376
  gr.Markdown("# πŸ“„ Smart PDF Summarizer")
 
15
 
16
  # Constants
17
  CONTEXT_SIZES = {
18
+ "4K": 4096, # Corrected to power of 2
19
+ "8K": 8192, # Corrected to power of 2
20
+ "32K": 32768, # Corrected to power of 2
21
+ "64K": 65536, # Added 64k option
22
+ "128K": 131072 # Corrected to power of 2
23
  }
24
 
25
  MODEL_CONTEXT_SIZES = {
 
371
  # State variables
372
  pdf_content = gr.State("")
373
  snippets = gr.State([])
374
+
375
+ # CSS for responsiveness
376
+ demo.css = """
377
+ .gradio-container {
378
+ max-width: 90%; /* Adjust as needed */
379
+ margin: 0 auto; /* Center the container */
380
+ }
381
+ @media (max-width: 768px) { /* Example breakpoint for smaller screens */
382
+ .gradio-container {
383
+ max-width: 98%;
384
+ padding: 10px; /* Add padding for better mobile experience */
385
+ }
386
+ .gr-row {
387
+ flex-direction: column; /* Stack elements vertically */
388
+ }
389
+ .gr-col {
390
+ width: 100%; /* Make columns full width */
391
+ margin-bottom: 10px; /* Add spacing between columns */
392
+ }
393
+ }
394
+ """
395
 
396
  # Header
397
  gr.Markdown("# πŸ“„ Smart PDF Summarizer")