seawolf2357 commited on
Commit
726b5c1
ยท
verified ยท
1 Parent(s): 7b7a227

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -8
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, # We'll rely on the custom Blocks css
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
- # *** ์ˆ˜์ • ํฌ์ธํŠธ: inputs=chat -> inputs=None ๋กœ ๋ณ€๊ฒฝ ***
751
  gr.Examples(
752
  examples=examples,
753
- inputs=None, # <-- ๊ธฐ์กด inputs=chat ์‚ฌ์šฉ ์‹œ ์—๋Ÿฌ ๋ฐœ์ƒ. None ์ฒ˜๋ฆฌ๋กœ ์ˆ˜์ •.
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()