Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,7 +2,7 @@ import os
|
|
| 2 |
import streamlit as st
|
| 3 |
import time
|
| 4 |
from metrics_tracker import MetricsTracker
|
| 5 |
-
from tool_handler import
|
| 6 |
|
| 7 |
# Load vector DB from ZIP on startup
|
| 8 |
import embedding
|
|
@@ -80,9 +80,9 @@ with st.container():
|
|
| 80 |
start_time = time.time()
|
| 81 |
st.session_state.chat_history.append({"user": user_query})
|
| 82 |
|
| 83 |
-
# Use PySpur
|
| 84 |
try:
|
| 85 |
-
response =
|
| 86 |
routed_correctly = True
|
| 87 |
except Exception as e:
|
| 88 |
response = f"Error handling query: {str(e)}"
|
|
|
|
| 2 |
import streamlit as st
|
| 3 |
import time
|
| 4 |
from metrics_tracker import MetricsTracker
|
| 5 |
+
from tool_handler import run_tool # Use PySpur-integrated run_tool function
|
| 6 |
|
| 7 |
# Load vector DB from ZIP on startup
|
| 8 |
import embedding
|
|
|
|
| 80 |
start_time = time.time()
|
| 81 |
st.session_state.chat_history.append({"user": user_query})
|
| 82 |
|
| 83 |
+
# Use PySpur-compatible tool runner
|
| 84 |
try:
|
| 85 |
+
response = run_tool(user_query, model=selected_model, use_rag=rag_toggle)
|
| 86 |
routed_correctly = True
|
| 87 |
except Exception as e:
|
| 88 |
response = f"Error handling query: {str(e)}"
|