Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ import gradio as gr
|
|
3 |
import nest_asyncio
|
4 |
from llama_index.core import StorageContext, load_index_from_storage
|
5 |
|
6 |
-
from telcom_core import query_rag_qa, query_graph_rag_qa, plot_full_kg, evaluate_llm
|
7 |
|
8 |
|
9 |
# Define constants for index paths
|
@@ -52,7 +52,7 @@ def eval_llm(query, rag_response, grag_response):
|
|
52 |
"""
|
53 |
grag_eval = evaluate_llm(query, grag_response)
|
54 |
rag_eval = evaluate_llm(query, rag_response)
|
55 |
-
return grag_eval, rag_eval
|
56 |
|
57 |
|
58 |
|
|
|
3 |
import nest_asyncio
|
4 |
from llama_index.core import StorageContext, load_index_from_storage
|
5 |
|
6 |
+
from telcom_core import query_rag_qa, query_graph_rag_qa, plot_full_kg, evaluate_llm, parse_evaluation_regex
|
7 |
|
8 |
|
9 |
# Define constants for index paths
|
|
|
52 |
"""
|
53 |
grag_eval = evaluate_llm(query, grag_response)
|
54 |
rag_eval = evaluate_llm(query, rag_response)
|
55 |
+
return parse_evaluation_regex(grag_eval), parse_evaluation_regex(rag_eval)
|
56 |
|
57 |
|
58 |
|