Spaces:
Running
Running
updated vectara-agentic and fixed bug in display
Browse files- requirements.txt +1 -1
- utils.py +3 -3
requirements.txt
CHANGED
@@ -6,4 +6,4 @@ streamlit_feedback==0.1.3
|
|
6 |
uuid==1.30
|
7 |
langdetect==1.0.9
|
8 |
langcodes==3.4.0
|
9 |
-
vectara-agentic==0.1.
|
|
|
6 |
uuid==1.30
|
7 |
langdetect==1.0.9
|
8 |
langcodes==3.4.0
|
9 |
+
vectara-agentic==0.1.4
|
utils.py
CHANGED
@@ -53,9 +53,9 @@ def send_amplitude_data(user_query, bot_response, demo_name, feedback=None):
|
|
53 |
print(f"Amplitude request failed with status code {response.status_code}. Response Text: {response.text}")
|
54 |
|
55 |
def escape_dollars_outside_latex(text):
|
56 |
-
# Define a regex pattern to find LaTeX equations (
|
57 |
-
pattern =
|
58 |
-
latex_matches =
|
59 |
|
60 |
# Placeholder to temporarily store LaTeX equations
|
61 |
placeholders = {}
|
|
|
53 |
print(f"Amplitude request failed with status code {response.status_code}. Response Text: {response.text}")
|
54 |
|
55 |
def escape_dollars_outside_latex(text):
|
56 |
+
# Define a regex pattern to find LaTeX equations (double $$ only)
|
57 |
+
pattern = r'\$\$.*?\$\$'
|
58 |
+
latex_matches = re.findall(pattern, text, re.DOTALL)
|
59 |
|
60 |
# Placeholder to temporarily store LaTeX equations
|
61 |
placeholders = {}
|