Spaces:
Running
Running
Commit
·
8d064dc
1
Parent(s):
2c72578
fix(app): resolve ImportError by using LLMService class directly
Browse files
app.py
CHANGED
@@ -2,7 +2,7 @@ import gradio as gr
|
|
2 |
from pathlib import Path
|
3 |
from pipeline.process import process_texts
|
4 |
from pipeline.visualize import generate_visualizations, generate_word_count_chart
|
5 |
-
from pipeline.llm_service import
|
6 |
import logging
|
7 |
import pandas as pd
|
8 |
from datetime import datetime
|
@@ -485,7 +485,8 @@ Each segment is represented as a vector of these TF-IDF scores, and the cosine s
|
|
485 |
|
486 |
# Get interpretation from LLM (using OpenRouter API)
|
487 |
progress(0.3, desc="Generating scholarly interpretation (this may take 20-40 seconds)...")
|
488 |
-
|
|
|
489 |
|
490 |
# Simulate completion steps
|
491 |
progress(0.9, desc="Formatting results...")
|
|
|
2 |
from pathlib import Path
|
3 |
from pipeline.process import process_texts
|
4 |
from pipeline.visualize import generate_visualizations, generate_word_count_chart
|
5 |
+
from pipeline.llm_service import LLMService
|
6 |
import logging
|
7 |
import pandas as pd
|
8 |
from datetime import datetime
|
|
|
485 |
|
486 |
# Get interpretation from LLM (using OpenRouter API)
|
487 |
progress(0.3, desc="Generating scholarly interpretation (this may take 20-40 seconds)...")
|
488 |
+
llm_service = LLMService()
|
489 |
+
interpretation = llm_service.analyze_similarity(df_results)
|
490 |
|
491 |
# Simulate completion steps
|
492 |
progress(0.9, desc="Formatting results...")
|