ofermend commited on
Commit
1707681
1 Parent(s): 136f987

updated vectara-agentic and fixed bug in display

Browse files
Files changed (2) hide show
  1. requirements.txt +1 -1
  2. 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.0
 
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 (either single $ or double $$)
57
- pattern = re.compile(r'(\$\$.*?\$\$|\$.*?\$)')
58
- latex_matches = pattern.findall(text)
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 = {}