nikravan commited on
Commit
e5db136
·
verified ·
1 Parent(s): 53ef11c

add latex support

Browse files
Files changed (1) hide show
  1. app.py +30 -0
app.py CHANGED
@@ -20,6 +20,35 @@ COLOR = "blue" # Color predeterminado de la interfaz
20
  EMOJI = "🤖" # Emoji predeterminado para el modelo
21
  DESCRIPTION = f"This is the {MODEL_NAME} model designed for testing thinking for general AI tasks." # Descripción predeterminada
22
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
 
25
  @spaces.GPU()
@@ -95,6 +124,7 @@ gr.ChatInterface(
95
  predict,
96
  title=EMOJI + " " + MODEL_NAME,
97
  description=DESCRIPTION,
 
98
 
99
 
100
  additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=False),
 
20
  EMOJI = "🤖" # Emoji predeterminado para el modelo
21
  DESCRIPTION = f"This is the {MODEL_NAME} model designed for testing thinking for general AI tasks." # Descripción predeterminada
22
 
23
+ latex_delimiters_set = [{
24
+ "left": "\\(",
25
+ "right": "\\)",
26
+ "display": False
27
+ }, {
28
+ "left": "\\begin{equation}",
29
+ "right": "\\end{equation}",
30
+ "display": True
31
+ }, {
32
+ "left": "\\begin{align}",
33
+ "right": "\\end{align}",
34
+ "display": True
35
+ }, {
36
+ "left": "\\begin{alignat}",
37
+ "right": "\\end{alignat}",
38
+ "display": True
39
+ }, {
40
+ "left": "\\begin{gather}",
41
+ "right": "\\end{gather}",
42
+ "display": True
43
+ }, {
44
+ "left": "\\begin{CD}",
45
+ "right": "\\end{CD}",
46
+ "display": True
47
+ }, {
48
+ "left": "\\[",
49
+ "right": "\\]",
50
+ "display": True
51
+ }]
52
 
53
 
54
  @spaces.GPU()
 
124
  predict,
125
  title=EMOJI + " " + MODEL_NAME,
126
  description=DESCRIPTION,
127
+ latex_delimiters=latex_delimiters_set,
128
 
129
 
130
  additional_inputs_accordion=gr.Accordion(label="⚙️ Parameters", open=False),