Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -154,11 +154,9 @@ document.addEventListener("DOMContentLoaded", function() {
|
|
| 154 |
MathJax.typeset(); // Process math expressions globally
|
| 155 |
});
|
| 156 |
"""
|
|
|
|
| 157 |
css="""
|
| 158 |
.chatbox {height: 400px; overflow: auto; border: 1px solid #262626; padding: 10px; background-color: #171717; display: flex; flex-direction: column-reverse;}
|
| 159 |
-
#chatbox-container .katex-display { display: inline; }
|
| 160 |
-
#chatbox-container .katex-display>.katex { display: inline; }
|
| 161 |
-
#chatbox-container .katex-display>.katex>.katex-html { display: inline; }
|
| 162 |
"""
|
| 163 |
with gr.Blocks(css=css, js=js) as demo:
|
| 164 |
|
|
@@ -172,37 +170,6 @@ with gr.Blocks(css=css, js=js) as demo:
|
|
| 172 |
|
| 173 |
with gr.Column(visible=False) as chat_view:
|
| 174 |
gr.Markdown("## P-MSQ Chat Interface")
|
| 175 |
-
gr.Markdown(label="answer",
|
| 176 |
-
latex_delimiters=[{
|
| 177 |
-
"left": "\\(",
|
| 178 |
-
"right": "\\)",
|
| 179 |
-
"display": True
|
| 180 |
-
}, {
|
| 181 |
-
"left": "\\begin\{equation\}",
|
| 182 |
-
"right": "\\end\{equation\}",
|
| 183 |
-
"display": True
|
| 184 |
-
}, {
|
| 185 |
-
"left": "\\begin\{align\}",
|
| 186 |
-
"right": "\\end\{align\}",
|
| 187 |
-
"display": True
|
| 188 |
-
}, {
|
| 189 |
-
"left": "\\begin\{alignat\}",
|
| 190 |
-
"right": "\\end\{alignat\}",
|
| 191 |
-
"display": True
|
| 192 |
-
}, {
|
| 193 |
-
"left": "\\begin\{gather\}",
|
| 194 |
-
"right": "\\end\{gather\}",
|
| 195 |
-
"display": True
|
| 196 |
-
}, {
|
| 197 |
-
"left": "\\begin\{CD\}",
|
| 198 |
-
"right": "\\end\{CD\}",
|
| 199 |
-
"display": True
|
| 200 |
-
}, {
|
| 201 |
-
"left": "\\[",
|
| 202 |
-
"right": "\\]",
|
| 203 |
-
"display": True
|
| 204 |
-
}],
|
| 205 |
-
elem_id="chatbox-container")
|
| 206 |
chatbot_output = gr.HTML(elem_id="chatbox-container")
|
| 207 |
|
| 208 |
msg_input = gr.Text(
|
|
|
|
| 154 |
MathJax.typeset(); // Process math expressions globally
|
| 155 |
});
|
| 156 |
"""
|
| 157 |
+
|
| 158 |
css="""
|
| 159 |
.chatbox {height: 400px; overflow: auto; border: 1px solid #262626; padding: 10px; background-color: #171717; display: flex; flex-direction: column-reverse;}
|
|
|
|
|
|
|
|
|
|
| 160 |
"""
|
| 161 |
with gr.Blocks(css=css, js=js) as demo:
|
| 162 |
|
|
|
|
| 170 |
|
| 171 |
with gr.Column(visible=False) as chat_view:
|
| 172 |
gr.Markdown("## P-MSQ Chat Interface")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 173 |
chatbot_output = gr.HTML(elem_id="chatbox-container")
|
| 174 |
|
| 175 |
msg_input = gr.Text(
|