Docfile commited on
Commit
26a0064
·
verified ·
1 Parent(s): 41fc713

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -36
app.py CHANGED
@@ -66,40 +66,23 @@ markdown = r"""
66
  """.format(e=e)
67
 
68
 
69
- iface = gr.Interface(fn=generate_content, inputs=gr.Image(type='pil'),outputs= gr.Markdown(markdown, latex_delimiters=[{ "left":"$$", "right":"$$", "display": True },{ "left":"$", "right":"$", "display": True },
70
- {
71
- "left": "\\(",
72
- "right": "\\)",
73
- "display": True
74
- }, {
75
- "left": "\\begin\{equation\}",
76
- "right": "\\end\{equation\}",
77
- "display": True
78
- }, {
79
- "left": "\\begin\{align\}",
80
- "right": "\\end\{align\}",
81
- "display": True
82
- }, {
83
- "left": "\\begin\{alignat\}",
84
- "right": "\\end\{alignat\}",
85
- "display": True
86
- }, {
87
- "left": "\\begin\{gather\}",
88
- "right": "\\end\{gather\}",
89
- "display": True
90
- }, {
91
- "left": "\\begin\{CD\}",
92
- "right": "\\end\{CD\}",
93
- "display": True
94
- }, {
95
- "left": "\\[",
96
- "right": "\\]",
97
- "display": True
98
- } ,
99
- {
100
- "left": "\chemfig",
101
- "right": "",
102
- "display": True
103
- }
104
- ]))
105
  iface.launch()
 
66
  """.format(e=e)
67
 
68
 
69
+ iface = gr.Interface(
70
+ fn=generate_content,
71
+ inputs=gr.Image(type='pil'),
72
+ outputs=gr.Markdown(
73
+ latex_delimiters=[
74
+ {"left": "$$", "right": "$$", "display": True},
75
+ {"left": "$", "right": "$", "display": True},
76
+ {"left": "\\chemfig{", "right": "}", "display": True}, # Modifié
77
+ {"left": "\\(", "right": "\\)", "display": True},
78
+ {"left": "\\begin{equation}", "right": "\\end{equation}", "display": True},
79
+ {"left": "\\begin{align}", "right": "\\end{align}", "display": True},
80
+ {"left": "\\begin{alignat}", "right": "\\end{alignat}", "display": True},
81
+ {"left": "\\begin{gather}", "right": "\\end{gather}", "display": True},
82
+ {"left": "\\begin{CD}", "right": "\\end{CD}", "display": True},
83
+ {"left": "\\[", "right": "\\]", "display": True}
84
+ ]
85
+ )
86
+ )
87
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
88
  iface.launch()