Update app.py
Browse files
app.py
CHANGED
|
@@ -64,8 +64,8 @@ def render_latex(text):
|
|
| 64 |
text = re.sub(r'\b([a-zA-Z]+)\^?(\d*)\b', r'$\1^{\2}$', text)
|
| 65 |
# Wrap functions: sin(x) β $\sin(x)$
|
| 66 |
text = re.sub(r'([a-zA-Z]+)\(([^)]+)\)', r'$\1(\2)$', text)
|
| 67 |
-
# Wrap limits: lim(xβ0) β $\lim_{x\
|
| 68 |
-
text = re.sub(r'lim\(([a-z])β([0-9.]+)\)', r'
|
| 69 |
return text
|
| 70 |
|
| 71 |
def respond(message, history, system_message, max_tokens, temperature, top_p):
|
|
|
|
| 64 |
text = re.sub(r'\b([a-zA-Z]+)\^?(\d*)\b', r'$\1^{\2}$', text)
|
| 65 |
# Wrap functions: sin(x) β $\sin(x)$
|
| 66 |
text = re.sub(r'([a-zA-Z]+)\(([^)]+)\)', r'$\1(\2)$', text)
|
| 67 |
+
# Wrap limits: lim(xβ0) β $\lim_{x \to 0}$
|
| 68 |
+
text = re.sub(r'lim\(([a-z])β([0-9.]+)\)', r'$\\lim_{ \1 \\to \2}$', text)
|
| 69 |
return text
|
| 70 |
|
| 71 |
def respond(message, history, system_message, max_tokens, temperature, top_p):
|