Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -691,7 +691,6 @@ with gr.Blocks(css=css, title="Vidraft-Gemma-3-27B") as demo:
|
|
691 |
label="Web Search Query",
|
692 |
placeholder="Enter search keywords..."
|
693 |
)
|
694 |
-
# No immediate function needed; the ChatInterface call will read these states
|
695 |
|
696 |
gr.Markdown("---")
|
697 |
gr.Markdown("#### System Prompt")
|
@@ -719,7 +718,6 @@ with gr.Blocks(css=css, title="Vidraft-Gemma-3-27B") as demo:
|
|
719 |
fn=run,
|
720 |
type="messages",
|
721 |
chatbot=gr.Chatbot(type="messages", scale=1, allow_tags=["image"]),
|
722 |
-
# .webp, .png, .jpg, .jpeg, .gif, .mp4, .csv, .txt, .pdf ๋ชจ๋ ํ์ฉ
|
723 |
textbox=gr.MultimodalTextbox(
|
724 |
file_types=[
|
725 |
".webp", ".png", ".jpg", ".jpeg", ".gif",
|
@@ -740,22 +738,19 @@ with gr.Blocks(css=css, title="Vidraft-Gemma-3-27B") as demo:
|
|
740 |
examples=examples,
|
741 |
run_examples_on_click=False,
|
742 |
cache_examples=False,
|
743 |
-
css_paths=None,
|
744 |
delete_cache=(1800, 1800),
|
745 |
)
|
746 |
|
747 |
with gr.Row(elem_id="examples_row"):
|
748 |
with gr.Column(scale=12, elem_id="examples_container"):
|
749 |
gr.Markdown("### Example Inputs (click to load)")
|
750 |
-
#
|
751 |
gr.Examples(
|
752 |
examples=examples,
|
753 |
-
inputs=
|
754 |
cache_examples=False
|
755 |
)
|
756 |
|
757 |
-
# Finally, launch
|
758 |
if __name__ == "__main__":
|
759 |
demo.launch()
|
760 |
-
|
761 |
-
|
|
|
691 |
label="Web Search Query",
|
692 |
placeholder="Enter search keywords..."
|
693 |
)
|
|
|
694 |
|
695 |
gr.Markdown("---")
|
696 |
gr.Markdown("#### System Prompt")
|
|
|
718 |
fn=run,
|
719 |
type="messages",
|
720 |
chatbot=gr.Chatbot(type="messages", scale=1, allow_tags=["image"]),
|
|
|
721 |
textbox=gr.MultimodalTextbox(
|
722 |
file_types=[
|
723 |
".webp", ".png", ".jpg", ".jpeg", ".gif",
|
|
|
738 |
examples=examples,
|
739 |
run_examples_on_click=False,
|
740 |
cache_examples=False,
|
741 |
+
css_paths=None,
|
742 |
delete_cache=(1800, 1800),
|
743 |
)
|
744 |
|
745 |
with gr.Row(elem_id="examples_row"):
|
746 |
with gr.Column(scale=12, elem_id="examples_container"):
|
747 |
gr.Markdown("### Example Inputs (click to load)")
|
748 |
+
# The fix: pass an empty list to avoid the "None" error, so we keep the code structure.
|
749 |
gr.Examples(
|
750 |
examples=examples,
|
751 |
+
inputs=[], # Instead of None or chat.
|
752 |
cache_examples=False
|
753 |
)
|
754 |
|
|
|
755 |
if __name__ == "__main__":
|
756 |
demo.launch()
|
|
|
|