Spaces:
Running
Running
siddhartharya
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -14,6 +14,7 @@ import sys
|
|
14 |
import threading
|
15 |
from queue import Queue, Empty
|
16 |
import json
|
|
|
17 |
|
18 |
# Import OpenAI library
|
19 |
import openai
|
@@ -567,7 +568,7 @@ def process_uploaded_file(file, state_bookmarks):
|
|
567 |
with ThreadPoolExecutor(max_workers=10) as executor:
|
568 |
executor.map(fetch_url_info, bookmarks)
|
569 |
|
570 |
-
#
|
571 |
logger.info("Enqueuing bookmarks for LLM processing")
|
572 |
for bookmark in bookmarks:
|
573 |
generate_summary_and_assign_category(bookmark)
|
|
|
14 |
import threading
|
15 |
from queue import Queue, Empty
|
16 |
import json
|
17 |
+
from concurrent.futures import ThreadPoolExecutor # Ensure this import is present
|
18 |
|
19 |
# Import OpenAI library
|
20 |
import openai
|
|
|
568 |
with ThreadPoolExecutor(max_workers=10) as executor:
|
569 |
executor.map(fetch_url_info, bookmarks)
|
570 |
|
571 |
+
# Enqueue bookmarks for LLM processing
|
572 |
logger.info("Enqueuing bookmarks for LLM processing")
|
573 |
for bookmark in bookmarks:
|
574 |
generate_summary_and_assign_category(bookmark)
|