Didier commited on
Commit
39be3da
·
verified ·
1 Parent(s): 21e5df5

Update module_vision.py

Browse files
Files changed (1) hide show
  1. module_vision.py +10 -7
module_vision.py CHANGED
@@ -14,11 +14,14 @@ def process(message, history):
14
  messages = vlm.build_messages(message, history)
15
  yield from vlm.stream_response(messages)
16
 
17
- #examples=[
18
- # [{"text": "What is happening in the video?", "files": ["Usain_Bolt_floats_to_victory.mp4"]}],
19
- # [{"text": "Pourrais-tu décrire cette image?", "files": ["le_monde_2025-04-01.jpg"]}],
20
- # [{"text": "Could you descrive the video?", "files": ["threads_brittlestar_post_DIABZcnJ.mp4"]}],
21
- #]
 
 
 
22
 
23
  #
24
  # User interface
@@ -26,8 +29,8 @@ def process(message, history):
26
  with gr.Blocks() as demo:
27
  chat_interface = gr.ChatInterface(
28
  fn=process,
29
- description="Chat with text / text+image.",
30
- #examples=examples,
31
  #cache_examples=False,
32
  stop_btn="Stop Generation",
33
  multimodal=True,
 
14
  messages = vlm.build_messages(message, history)
15
  yield from vlm.stream_response(messages)
16
 
17
+ examples=[
18
+ {
19
+ 'files': ['./passport_jp.png',],
20
+ 'text': 'Can you describe the image and present the information as a JSON document?'
21
+ },
22
+ {'text': 'How can we rationalize quantum entanglement?'},
23
+ {'text': "Peux-tu expliquer le terme 'quantum spin'?"}
24
+ ]
25
 
26
  #
27
  # User interface
 
29
  with gr.Blocks() as demo:
30
  chat_interface = gr.ChatInterface(
31
  fn=process,
32
+ description="Chat with text or text+image.",
33
+ examples=examples,
34
  #cache_examples=False,
35
  stop_btn="Stop Generation",
36
  multimodal=True,