progress apply
This commit is contained in:
@@ -2,4 +2,4 @@ from .ollama_utils import connect_qumo_ollama
|
||||
from .data_utils import create_sentiment_matrix, extract_theme
|
||||
from .transcript_utils import load_srt, csv_to_markdown, cpc_smb_to_markdown
|
||||
from .sentiment_analysis import dummy_sentiment_analysis, ollama_sentiment_analysis
|
||||
from .keyword_analysis import ollama_keyword_extraction
|
||||
from .keyword_analysis import ollama_keyword_extraction, worker_extraction
|
||||
|
||||
@@ -4,6 +4,19 @@ from ollama import Client
|
||||
import json
|
||||
|
||||
|
||||
def worker_extraction(row, host, model):
|
||||
|
||||
|
||||
# Instantiate local client for this specific worker/thread
|
||||
local_client = Client(host=host)
|
||||
|
||||
return ollama_keyword_extraction(
|
||||
content=row['content'],
|
||||
tag=row['tag'],
|
||||
client=local_client,
|
||||
model=model
|
||||
)
|
||||
|
||||
|
||||
def ollama_keyword_extraction(content, tag, client: Client, model) -> list:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user