Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -66,40 +66,23 @@ markdown = r"""
|
|
66 |
""".format(e=e)
|
67 |
|
68 |
|
69 |
-
iface = gr.Interface(
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
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()
|