Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -417,25 +417,27 @@ demo = gr.Blocks(css=CSS,js=js, theme='NoCrypt/miku')
|
|
417 |
with demo:
|
418 |
think_mode = gr.State(False) # Lưu trạng thái Think Mode
|
419 |
|
|
|
|
|
420 |
chat_demo_interface = gr.ChatInterface(
|
421 |
fn=chat,
|
422 |
description="""**Vintern-3B-R-beta** is the latest in the Vintern series.""",
|
423 |
examples=[
|
424 |
-
[{"text": "Trích xuất các thông tin từ ảnh trả về markdown.", "files":["./demo_1.jpg"]}, False],
|
425 |
-
[{"text": "Liệt kê toàn bộ văn bản.", "files":["./demo_2.jpg"]}, False],
|
426 |
-
[{"text": "Trích xuất thông tin kiện hàng trong ảnh và trả về dạng JSON.", "files":["./demo_4.jpg"]}, False]
|
427 |
],
|
428 |
# additional_inputs=[think_mode],
|
429 |
title="❄️Vintern-3B-R-beta❄️",
|
430 |
multimodal=True,
|
431 |
css=CSS,
|
432 |
js=js,
|
433 |
-
|
434 |
theme='NoCrypt/miku'
|
435 |
)
|
436 |
|
437 |
|
438 |
-
|
439 |
# Khi nhấn nút, trạng thái think_mode thay đổi + đổi nhãn nút
|
440 |
think_button.click(toggle_think_mode, inputs=[think_mode], outputs=[think_mode, think_button])
|
441 |
|
|
|
417 |
with demo:
|
418 |
think_mode = gr.State(False) # Lưu trạng thái Think Mode
|
419 |
|
420 |
+
think_button = gr.Button("🧠Think", elem_id="think-button", variant="secondary")
|
421 |
+
|
422 |
chat_demo_interface = gr.ChatInterface(
|
423 |
fn=chat,
|
424 |
description="""**Vintern-3B-R-beta** is the latest in the Vintern series.""",
|
425 |
examples=[
|
426 |
+
[{"text": "Trích xuất các thông tin từ ảnh trả về markdown.", "files":["./demo_1.jpg"]}, False,False],
|
427 |
+
[{"text": "Liệt kê toàn bộ văn bản.", "files":["./demo_2.jpg"]}, False,False],
|
428 |
+
[{"text": "Trích xuất thông tin kiện hàng trong ảnh và trả về dạng JSON.", "files":["./demo_4.jpg"]}, False,False]
|
429 |
],
|
430 |
# additional_inputs=[think_mode],
|
431 |
title="❄️Vintern-3B-R-beta❄️",
|
432 |
multimodal=True,
|
433 |
css=CSS,
|
434 |
js=js,
|
435 |
+
additional_inputs=[think_button],
|
436 |
theme='NoCrypt/miku'
|
437 |
)
|
438 |
|
439 |
|
440 |
+
|
441 |
# Khi nhấn nút, trạng thái think_mode thay đổi + đổi nhãn nút
|
442 |
think_button.click(toggle_think_mode, inputs=[think_mode], outputs=[think_mode, think_button])
|
443 |
|