Zaherrr commited on
Commit
636931b
1 Parent(s): a7af971

removed the examples block

Browse files
Files changed (1) hide show
  1. app.py +17 -17
app.py CHANGED
@@ -94,16 +94,16 @@ with gr.Blocks(fill_height=True) as demo:
94
  output = gr.Textbox(label="Output")
95
 
96
  with gr.Accordion(label="Example Inputs and Advanced Generation Parameters"):
97
- examples=[
98
- ["example_images/mmmu_example.jpeg", "Chase wants to buy 4 kilograms of oval beads and 5 kilograms of star-shaped beads. How much will he spend?", "Let's think step by step.", "Greedy", 0.4, 512, 1.2, 0.8],
99
- ["example_images/rococo_1.jpg", "What art era is this?", None, "Greedy", 0.4, 512, 1.2, 0.8],
100
- ["example_images/paper_with_text.png", "Read what's written on the paper", None, "Greedy", 0.4, 512, 1.2, 0.8],
101
- ["example_images/dragons_playing.png","What's unusual about this image?",None, "Greedy", 0.4, 512, 1.2, 0.8],
102
- ["example_images/example_images_ai2d_example_2.jpeg", "What happens to fish if pelicans increase?", None, "Greedy", 0.4, 512, 1.2, 0.8],
103
- ["example_images/travel_tips.jpg", "I want to go somewhere similar to the one in the photo. Give me destinations and travel tips.", None, "Greedy", 0.4, 512, 1.2, 0.8],
104
- ["example_images/dummy_pdf.png", "How much percent is the order status?", None, "Greedy", 0.4, 512, 1.2, 0.8],
105
- ["example_images/art_critic.png", "As an art critic AI assistant, could you describe this painting in details and make a thorough critic?.",None, "Greedy", 0.4, 512, 1.2, 0.8],
106
- ["example_images/s2w_example.png", "What is this UI about?", None,"Greedy", 0.4, 512, 1.2, 0.8]]
107
 
108
  # Hyper-parameters for generation
109
  max_new_tokens = gr.Slider(
@@ -175,13 +175,13 @@ with gr.Blocks(fill_height=True) as demo:
175
  inputs=decoding_strategy,
176
  outputs=top_p,
177
  )
178
- gr.Examples(
179
- examples = examples,
180
- inputs=[image_input, query_input, assistant_prefix, decoding_strategy, temperature,
181
- max_new_tokens, repetition_penalty, top_p],
182
- outputs=output,
183
- fn=model_inference
184
- )
185
 
186
  submit_btn.click(model_inference, inputs = [image_input, query_input, assistant_prefix, decoding_strategy, temperature,
187
  max_new_tokens, repetition_penalty, top_p], outputs=output)
 
94
  output = gr.Textbox(label="Output")
95
 
96
  with gr.Accordion(label="Example Inputs and Advanced Generation Parameters"):
97
+ # examples=[
98
+ # ["example_images/mmmu_example.jpeg", "Chase wants to buy 4 kilograms of oval beads and 5 kilograms of star-shaped beads. How much will he spend?", "Let's think step by step.", "Greedy", 0.4, 512, 1.2, 0.8],
99
+ # ["example_images/rococo_1.jpg", "What art era is this?", None, "Greedy", 0.4, 512, 1.2, 0.8],
100
+ # ["example_images/paper_with_text.png", "Read what's written on the paper", None, "Greedy", 0.4, 512, 1.2, 0.8],
101
+ # ["example_images/dragons_playing.png","What's unusual about this image?",None, "Greedy", 0.4, 512, 1.2, 0.8],
102
+ # ["example_images/example_images_ai2d_example_2.jpeg", "What happens to fish if pelicans increase?", None, "Greedy", 0.4, 512, 1.2, 0.8],
103
+ # ["example_images/travel_tips.jpg", "I want to go somewhere similar to the one in the photo. Give me destinations and travel tips.", None, "Greedy", 0.4, 512, 1.2, 0.8],
104
+ # ["example_images/dummy_pdf.png", "How much percent is the order status?", None, "Greedy", 0.4, 512, 1.2, 0.8],
105
+ # ["example_images/art_critic.png", "As an art critic AI assistant, could you describe this painting in details and make a thorough critic?.",None, "Greedy", 0.4, 512, 1.2, 0.8],
106
+ # ["example_images/s2w_example.png", "What is this UI about?", None,"Greedy", 0.4, 512, 1.2, 0.8]]
107
 
108
  # Hyper-parameters for generation
109
  max_new_tokens = gr.Slider(
 
175
  inputs=decoding_strategy,
176
  outputs=top_p,
177
  )
178
+ # gr.Examples(
179
+ # examples = examples,
180
+ # inputs=[image_input, query_input, assistant_prefix, decoding_strategy, temperature,
181
+ # max_new_tokens, repetition_penalty, top_p],
182
+ # outputs=output,
183
+ # fn=model_inference
184
+ # )
185
 
186
  submit_btn.click(model_inference, inputs = [image_input, query_input, assistant_prefix, decoding_strategy, temperature,
187
  max_new_tokens, repetition_penalty, top_p], outputs=output)