Spaces:
Running
Running
Update app.py
Browse files
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=
|
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=
|
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='
|
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")
|