misdelivery commited on
Commit
6c2ef8d
ยท
verified ยท
1 Parent(s): 11ec7bf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -7,7 +7,7 @@ import gradio as gr
7
  from gradio import FileData
8
  import time
9
  import spaces
10
- ckpt = "meta-llama/Llama-3.2-11B-Vision-Instruct"
11
  model = MllamaForConditionalGeneration.from_pretrained(ckpt,
12
  torch_dtype=torch.bfloat16).to("cuda")
13
  processor = AutoProcessor.from_pretrained(ckpt)
@@ -71,15 +71,15 @@ def bot_streaming(message, history, max_new_tokens=250):
71
 
72
 
73
  demo = gr.ChatInterface(fn=bot_streaming, title="Multimodal Llama", examples=[
74
- [{"text": "Which era does this piece belong to? Give details about the era.", "files":["./examples/rococo.jpg"]},
75
  200],
76
- [{"text": "Where do the droughts happen according to this diagram?", "files":["./examples/weather_events.png"]},
77
  250],
78
- [{"text": "What happens when you take out white cat from this chain?", "files":["./examples/ai2d_test.jpg"]},
79
  250],
80
- [{"text": "How long does it take from invoice date to due date? Be short and concise.", "files":["./examples/invoice.png"]},
81
  250],
82
- [{"text": "Where to find this monument? Can you give me other recommendations around the area?", "files":["./examples/wat_arun.jpg"]},
83
  250],
84
  ],
85
  textbox=gr.MultimodalTextbox(),
 
7
  from gradio import FileData
8
  import time
9
  import spaces
10
+ ckpt = "misdelivery/Llama-3.2-11B-Vision-Instruct-ja-test"
11
  model = MllamaForConditionalGeneration.from_pretrained(ckpt,
12
  torch_dtype=torch.bfloat16).to("cuda")
13
  processor = AutoProcessor.from_pretrained(ckpt)
 
71
 
72
 
73
  demo = gr.ChatInterface(fn=bot_streaming, title="Multimodal Llama", examples=[
74
+ [{"text": "ใ“ใฎไฝœๅ“ใฏใฉใฎๆ™‚ไปฃใซๅฑžใ—ใฆใ„ใพใ™ใ‹๏ผŸใใฎๆ™‚ไปฃใซใคใ„ใฆ่ฉณใ—ใๆ•™ใˆใฆใใ ใ•ใ„ใ€‚", "files":["./examples/rococo.jpg"]},
75
  200],
76
+ [{"text": "ใ“ใฎๅ›ณใซใ‚ˆใ‚‹ใจใ€ๅนฒใฐใคใฏใฉใ“ใง็™บ็”Ÿใ—ใพใ™ใ‹๏ผŸ", "files":["./examples/weather_events.png"]},
77
  250],
78
+ [{"text": "ใ“ใฎ้Ž–ใ‹ใ‚‰็™ฝใ„็Œซใ‚’ๅค–ใ™ใจใฉใ†ใชใ‚Šใพใ™ใ‹๏ผŸ", "files":["./examples/ai2d_test.jpg"]},
79
  250],
80
+ [{"text": "่ซ‹ๆฑ‚ๆ—ฅใ‹ใ‚‰ๆœŸๆ—ฅใพใงใฎๆœŸ้–“ใฏ๏ผŸ็Ÿญใ็ฐกๆฝ”ใซ็ญ”ใˆใฆใใ ใ•ใ„ใ€‚", "files":["./examples/invoice.png"]},
81
  250],
82
+ [{"text": "ใ“ใฎใƒขใƒ‹ใƒฅใƒกใƒณใƒˆใฏใฉใ“ใซใ‚ใ‚Šใพใ™ใ‹๏ผŸๅ‘จ่พบๅœฐๅŸŸใฎใŠใ™ใ™ใ‚ใ‚’ๆ•™ใˆใฆใ„ใŸใ ใ‘ใพใ™ใ‹", "files":["./examples/wat_arun.jpg"]},
83
  250],
84
  ],
85
  textbox=gr.MultimodalTextbox(),