C2MV commited on
Commit
2d4634b
1 Parent(s): bf04e26

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -2
app.py CHANGED
@@ -338,7 +338,16 @@ def create_gradio_interface():
338
  """Create Gradio interface for Paper Downloader"""
339
  downloader = PaperDownloader()
340
 
341
- def download_papers(bib_file, doi_input, dois_input):
 
 
 
 
 
 
 
 
 
342
  if bib_file:
343
  # Check file type
344
  if not bib_file.name.lower().endswith('.bib'):
@@ -362,7 +371,8 @@ def create_gradio_interface():
362
  inputs=[
363
  gr.File(file_types=['.bib'], label="Upload BibTeX File"),
364
  gr.Textbox(label="Enter Single DOI", placeholder="10.xxxx/xxxx"),
365
- gr.Textbox(label="Enter Multiple DOIs (one per line)", placeholder="10.xxxx/xxxx\n10.yyyy/yyyy\n...")
 
366
  ],
367
  outputs=[
368
  gr.File(label="Download Papers (ZIP) or Single PDF"),
 
338
  """Create Gradio interface for Paper Downloader"""
339
  downloader = PaperDownloader()
340
 
341
+ def download_papers(bib_file, doi_input, dois_input, theme_mode):
342
+ if theme_mode == "dark":
343
+ theme = gr.themes.Monochrome(
344
+ primary_hue="indigo",
345
+ secondary_hue="neutral",
346
+ )
347
+
348
+ else:
349
+ theme = "gstaff/sketch"
350
+
351
  if bib_file:
352
  # Check file type
353
  if not bib_file.name.lower().endswith('.bib'):
 
371
  inputs=[
372
  gr.File(file_types=['.bib'], label="Upload BibTeX File"),
373
  gr.Textbox(label="Enter Single DOI", placeholder="10.xxxx/xxxx"),
374
+ gr.Textbox(label="Enter Multiple DOIs (one per line)", placeholder="10.xxxx/xxxx\n10.yyyy/yyyy\n..."),
375
+ gr.Dropdown(choices=["light", "dark"], value="light", label="Theme mode"),
376
  ],
377
  outputs=[
378
  gr.File(label="Download Papers (ZIP) or Single PDF"),