merve HF staff commited on
Commit
c79a7bc
·
verified ·
1 Parent(s): 145db83

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -5
app.py CHANGED
@@ -78,16 +78,19 @@ with gr.Blocks(fill_height=False) as demo:
78
  gr.Markdown("## SmolVLM: Small yet Mighty 💫")
79
  gr.Markdown("Play with [HuggingFaceTB/SmolVLM-Instruct](https://huggingface.co/HuggingFaceTB/SmolVLM-Instruct) in this demo. To get started, upload an image and text or try one of the examples.")
80
  with gr.Column():
81
- image_input = gr.Image(label="Upload your Image", type="pil", height=400)
82
- query_input = gr.Textbox(label="Prompt")
83
- assistant_prefix = gr.Textbox(label="Assistant Prefix", placeholder="Let's think step by step.")
84
 
85
- submit_btn = gr.Button("Submit")
 
 
 
 
86
  output = gr.Textbox(label="Output")
87
 
88
 
89
 
90
- with gr.Accordion(label="Examples and Advanced Generation Parameters", open=False):
91
  examples=[
92
  ["example_images/rococo.jpg", "What art era is this?", "", "Greedy", 0.4, 512, 1.2, 0.8],
93
  ["example_images/examples_wat_arun.jpg", "Give me travel tips for the area around this monument.", "", "Greedy", 0.4, 512, 1.2, 0.8],
 
78
  gr.Markdown("## SmolVLM: Small yet Mighty 💫")
79
  gr.Markdown("Play with [HuggingFaceTB/SmolVLM-Instruct](https://huggingface.co/HuggingFaceTB/SmolVLM-Instruct) in this demo. To get started, upload an image and text or try one of the examples.")
80
  with gr.Column():
81
+ with gr.Row():
82
+ image_input = gr.Image(label="Upload your Image", type="pil")
 
83
 
84
+ with gr.Column():
85
+ query_input = gr.Textbox(label="Prompt")
86
+ assistant_prefix = gr.Textbox(label="Assistant Prefix", placeholder="Let's think step by step.")
87
+
88
+ submit_btn = gr.Button("Submit")
89
  output = gr.Textbox(label="Output")
90
 
91
 
92
 
93
+ with gr.Accordion(label="Advanced Generation Parameters", open=False):
94
  examples=[
95
  ["example_images/rococo.jpg", "What art era is this?", "", "Greedy", 0.4, 512, 1.2, 0.8],
96
  ["example_images/examples_wat_arun.jpg", "Give me travel tips for the area around this monument.", "", "Greedy", 0.4, 512, 1.2, 0.8],