@@ -174,7 +174,7 @@ def http_bot(state, model_selector, temperature, top_p, max_new_tokens, max_inpu
174174 start_tstamp = time .time ()
175175 model_name = model_selector
176176
177- if state .skip_next :
177+ if hasattr ( state , 'skip_next' ) and state .skip_next :
178178 # This generate call is skipped due to invalid inputs
179179 yield (state , state .to_gradio_chatbot ()) + (no_change_btn ,) * 5
180180 return
@@ -308,8 +308,8 @@ def http_bot(state, model_selector, temperature, top_p, max_new_tokens, max_inpu
308308 fout .write (json .dumps (data ) + "\n " )
309309
310310title_markdown = ("""
311- # InternVL: Scaling up Vision Foundation Models and Aligning for Generic Visual-Linguistic Tasks
312- 💻 [[Code](https://github.com/OpenGVLab/InternVL)] | 📚 [[Paper](https://arxiv.org/abs/2312.14238)] | 🌟 [[Quick Start](https://github.com/OpenGVLab/InternVL?tab=readme-ov-file#quick-start-with-huggingface)]
311+ # InternVL Family: A Pioneering Open-Source Alternative to GPT-4V [CVPR 2024 Oral]
312+ 💻 [[Code](https://github.com/OpenGVLab/InternVL)] | 📚 [[Paper](https://arxiv.org/abs/2312.14238)] | 🌟 [[Quick Start](https://github.com/OpenGVLab/InternVL?tab=readme-ov-file#quick-start-with-huggingface)] | 🤗 [[Hugging Face](https://huggingface.co/OpenGVLab/InternVL-Chat-V1-5)]
313313""" )
314314
315315tos_markdown = ("""
@@ -363,11 +363,13 @@ def build_demo(embed_mode):
363363
364364 cur_dir = os .path .dirname (os .path .abspath (__file__ ))
365365 gr .Examples (examples = [
366- [f"{ cur_dir } /examples/extreme_ironing.jpg" , "What is unusual about this image?" ],
367- [f"{ cur_dir } /examples/waterview.jpg" , "What are the things I should be cautious about when I visit here?" ],
366+ [f"{ cur_dir } /examples/img1.jpg" , "What does this image mean" ],
367+ [f"{ cur_dir } /examples/img3.jpg" , "Describe this image in detail" ],
368+ [f"{ cur_dir } /examples/img5.jpg" , "Please read the text in this image and return the information in the JSON format" ],
369+ [f"{ cur_dir } /examples/img6.jpg" , "How many dogs are in the figure, and why?" ],
368370 ], inputs = [imagebox , textbox ])
369371
370- with gr .Accordion ("Parameters" , open = True ) as parameter_row :
372+ with gr .Accordion ("Parameters" , open = False ) as parameter_row :
371373 temperature = gr .Slider (minimum = 0.0 , maximum = 1.0 , value = 0.8 , step = 0.1 , interactive = True , label = "Temperature" ,)
372374 top_p = gr .Slider (minimum = 0.0 , maximum = 1.0 , value = 0.7 , step = 0.1 , interactive = True , label = "Top P" ,)
373375 max_output_tokens = gr .Slider (minimum = 0 , maximum = 4096 , value = 1024 , step = 64 , interactive = True , label = "Max output tokens" ,)
0 commit comments