Update app.py
Browse files
app.py
CHANGED
|
@@ -322,22 +322,16 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="teal", secondary_hue="slate", n
|
|
| 322 |
)
|
| 323 |
|
| 324 |
|
| 325 |
-
|
| 326 |
-
|
| 327 |
-
(
|
| 328 |
-
|
| 329 |
-
style.textContent = `
|
| 330 |
.chatbot-wrapper .message {
|
| 331 |
-
|
| 332 |
-
|
| 333 |
-
|
| 334 |
-
|
| 335 |
-
|
| 336 |
-
}
|
| 337 |
-
""")
|
| 338 |
-
|
| 339 |
-
# Add CSS styling
|
| 340 |
-
with gr.Blocks() as demo: # Use blocks to add javascript styling
|
| 341 |
gr.Markdown("# Chat with Gemini 2.0 Flash and See its Thoughts 💭")
|
| 342 |
|
| 343 |
gr.HTML("""<a href="https://visitorbadge.io/status?path=https%3A%2F%2Faiqcamp-Gemini2-Flash-Thinking.hf.space">
|
|
@@ -456,7 +450,8 @@ with gr.Blocks() as demo: # Use blocks to add javascript styling
|
|
| 456 |
"""
|
| 457 |
)
|
| 458 |
|
| 459 |
-
|
|
|
|
| 460 |
demo.load(js="""
|
| 461 |
() => {
|
| 462 |
const style = document.createElement('style');
|
|
@@ -469,9 +464,6 @@ with gr.Blocks() as demo: # Use blocks to add javascript styling
|
|
| 469 |
document.head.appendChild(style);
|
| 470 |
}
|
| 471 |
""")
|
| 472 |
-
|
| 473 |
-
|
| 474 |
-
|
| 475 |
|
| 476 |
|
| 477 |
# Launch the interface
|
|
|
|
| 322 |
)
|
| 323 |
|
| 324 |
|
| 325 |
+
# 메인 Blocks 인터페이스 생성
|
| 326 |
+
with gr.Blocks(
|
| 327 |
+
theme=gr.themes.Soft(primary_hue="teal", secondary_hue="slate", neutral_hue="neutral"),
|
| 328 |
+
css="""
|
|
|
|
| 329 |
.chatbot-wrapper .message {
|
| 330 |
+
white-space: pre-wrap;
|
| 331 |
+
word-wrap: break-word;
|
| 332 |
+
}
|
| 333 |
+
"""
|
| 334 |
+
) as demo:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 335 |
gr.Markdown("# Chat with Gemini 2.0 Flash and See its Thoughts 💭")
|
| 336 |
|
| 337 |
gr.HTML("""<a href="https://visitorbadge.io/status?path=https%3A%2F%2Faiqcamp-Gemini2-Flash-Thinking.hf.space">
|
|
|
|
| 450 |
"""
|
| 451 |
)
|
| 452 |
|
| 453 |
+
|
| 454 |
+
# Add CSS styling
|
| 455 |
demo.load(js="""
|
| 456 |
() => {
|
| 457 |
const style = document.createElement('style');
|
|
|
|
| 464 |
document.head.appendChild(style);
|
| 465 |
}
|
| 466 |
""")
|
|
|
|
|
|
|
|
|
|
| 467 |
|
| 468 |
|
| 469 |
# Launch the interface
|