Gradio 6.0 compatibility fix: moved css/theme to launch, removed bubble_full_width
Browse files
app.py
CHANGED
|
@@ -334,7 +334,7 @@ EXAMPLES = [
|
|
| 334 |
]
|
| 335 |
|
| 336 |
def build():
|
| 337 |
-
with gr.Blocks(
|
| 338 |
|
| 339 |
# ββ Hero ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 340 |
gr.HTML("""
|
|
@@ -367,18 +367,15 @@ def build():
|
|
| 367 |
"https://huggingface.co/front/assets/icons/8.svg",
|
| 368 |
"https://huggingface.co/front/assets/icons/13.svg"
|
| 369 |
),
|
| 370 |
-
bubble_full_width=False,
|
| 371 |
)
|
| 372 |
|
| 373 |
with gr.Row():
|
| 374 |
msg = gr.Textbox(
|
| 375 |
placeholder="Type a message or try an example below...",
|
| 376 |
scale=5,
|
| 377 |
-
container=True,
|
| 378 |
-
show_label=False,
|
| 379 |
elem_id="main-input",
|
| 380 |
)
|
| 381 |
-
send_btn = gr.Button("Send β", scale=1,
|
| 382 |
|
| 383 |
# ββ Events ββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 384 |
msg.submit(chat_fn, [msg, chat], [chat])
|
|
@@ -405,4 +402,12 @@ def build():
|
|
| 405 |
return demo
|
| 406 |
|
| 407 |
if __name__ == "__main__":
|
| 408 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 334 |
]
|
| 335 |
|
| 336 |
def build():
|
| 337 |
+
with gr.Blocks(title="Stack X Ultimate") as demo:
|
| 338 |
|
| 339 |
# ββ Hero ββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 340 |
gr.HTML("""
|
|
|
|
| 367 |
"https://huggingface.co/front/assets/icons/8.svg",
|
| 368 |
"https://huggingface.co/front/assets/icons/13.svg"
|
| 369 |
),
|
|
|
|
| 370 |
)
|
| 371 |
|
| 372 |
with gr.Row():
|
| 373 |
msg = gr.Textbox(
|
| 374 |
placeholder="Type a message or try an example below...",
|
| 375 |
scale=5,
|
|
|
|
|
|
|
| 376 |
elem_id="main-input",
|
| 377 |
)
|
| 378 |
+
send_btn = gr.Button("Send β", scale=1, elem_class="send-btn")
|
| 379 |
|
| 380 |
# ββ Events ββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 381 |
msg.submit(chat_fn, [msg, chat], [chat])
|
|
|
|
| 402 |
return demo
|
| 403 |
|
| 404 |
if __name__ == "__main__":
|
| 405 |
+
demo = build()
|
| 406 |
+
demo.launch(
|
| 407 |
+
server_name="0.0.0.0",
|
| 408 |
+
server_port=7860,
|
| 409 |
+
css=DARK_CSS,
|
| 410 |
+
theme=gr.themes.Default(primary_hue="purple"),
|
| 411 |
+
max_threads=4,
|
| 412 |
+
show_api=False,
|
| 413 |
+
)
|