mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-12-16 20:00:36 +08:00
video datasets
This commit is contained in:
@@ -43,8 +43,12 @@ def create_chat_box(
|
||||
system = gr.Textbox(show_label=False)
|
||||
tools = gr.Textbox(show_label=False, lines=3)
|
||||
|
||||
with gr.Column() as image_box:
|
||||
image = gr.Image(sources=["upload"], type="pil")
|
||||
with gr.Column() as mm_box:
|
||||
with gr.Tab("Image"):
|
||||
image = gr.Image(sources=["upload"], type="pil")
|
||||
|
||||
with gr.Tab("Video"):
|
||||
video = gr.Video(sources=["upload"])
|
||||
|
||||
query = gr.Textbox(show_label=False, lines=8)
|
||||
submit_btn = gr.Button(variant="primary")
|
||||
@@ -63,7 +67,7 @@ def create_chat_box(
|
||||
[chatbot, messages, query],
|
||||
).then(
|
||||
engine.chatter.stream,
|
||||
[chatbot, messages, system, tools, image, max_new_tokens, top_p, temperature],
|
||||
[chatbot, messages, system, tools, image, video, max_new_tokens, top_p, temperature],
|
||||
[chatbot, messages],
|
||||
)
|
||||
clear_btn.click(lambda: ([], []), outputs=[chatbot, messages])
|
||||
@@ -76,8 +80,9 @@ def create_chat_box(
|
||||
role=role,
|
||||
system=system,
|
||||
tools=tools,
|
||||
image_box=image_box,
|
||||
mm_box=mm_box,
|
||||
image=image,
|
||||
video=video,
|
||||
query=query,
|
||||
submit_btn=submit_btn,
|
||||
max_new_tokens=max_new_tokens,
|
||||
|
||||
Reference in New Issue
Block a user