siddhartharya commited on
Commit
6801885
Β·
verified Β·
1 Parent(s): dea9f7b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -509,12 +509,12 @@ def process_uploaded_file(file, state_bookmarks):
509
 
510
  # Fetch bookmark info concurrently
511
  logger.info("Fetching URL info concurrently")
512
- with ThreadPoolExecutor(max_workers=20) as executor:
513
  executor.map(fetch_url_info, bookmarks)
514
 
515
  # Generate summaries and assign categories
516
  logger.info("Generating summaries and assigning categories")
517
- with ThreadPoolExecutor(max_workers=5) as executor:
518
  executor.map(generate_summary_and_assign_category, bookmarks)
519
 
520
  try:
@@ -782,7 +782,7 @@ Navigate through the tabs to explore each feature in detail.
782
  - Once processing is complete, your bookmarks will be displayed in an organized and visually appealing format below.
783
  """)
784
 
785
- upload = gr.File(label="πŸ“ Upload Bookmarks HTML File", type='file')
786
  process_button = gr.Button("βš™οΈ Process Bookmarks")
787
  output_text = gr.Textbox(label="βœ… Output", interactive=False)
788
  bookmark_display = gr.HTML(label="πŸ“„ Processed Bookmarks")
 
509
 
510
  # Fetch bookmark info concurrently
511
  logger.info("Fetching URL info concurrently")
512
+ with ThreadPoolExecutor(max_workers=10) as executor: # Adjusted max_workers
513
  executor.map(fetch_url_info, bookmarks)
514
 
515
  # Generate summaries and assign categories
516
  logger.info("Generating summaries and assigning categories")
517
+ with ThreadPoolExecutor(max_workers=3) as executor: # Adjusted max_workers
518
  executor.map(generate_summary_and_assign_category, bookmarks)
519
 
520
  try:
 
782
  - Once processing is complete, your bookmarks will be displayed in an organized and visually appealing format below.
783
  """)
784
 
785
+ upload = gr.File(label="πŸ“ Upload Bookmarks HTML File", type='binary')
786
  process_button = gr.Button("βš™οΈ Process Bookmarks")
787
  output_text = gr.Textbox(label="βœ… Output", interactive=False)
788
  bookmark_display = gr.HTML(label="πŸ“„ Processed Bookmarks")