sunbv56 commited on
Commit
d5bebb0
·
verified ·
1 Parent(s): 9bc5cc9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,7 +12,7 @@ import requests
12
  warnings.filterwarnings("ignore", category=UserWarning, message="Overriding torch_dtype=None")
13
 
14
  # --- 1. Tải Model và Processor ---
15
- MODEL_ID = "sunbv56/qwen2.5-vl-vqa-vibook-lora-merged"
16
  print(f"🚀 Đang tải model '{MODEL_ID}' và processor...")
17
  try:
18
  dtype = torch.bfloat16 if torch.cuda.is_available() and torch.cuda.is_bf16_supported() else torch.float16
@@ -108,7 +108,7 @@ with gr.Blocks(theme=gr.themes.Soft(primary_hue="blue", secondary_hue="sky"), ti
108
  with gr.Row(equal_height=False):
109
  with gr.Column(scale=1, min_width=350):
110
  gr.Markdown("### Bảng điều khiển")
111
- image_input = gr.Image(type="pil", label="Tải ảnh lên", sources=["upload", "clipboard"])
112
  gr.Markdown("---")
113
  gr.Markdown("### Ví dụ (Nhấn để chạy)")
114
  example_dataset = gr.Dataset(components=[gr.Image(visible=False), gr.Textbox(visible=False)], samples=example_list, label="Ví dụ", type="index")
 
12
  warnings.filterwarnings("ignore", category=UserWarning, message="Overriding torch_dtype=None")
13
 
14
  # --- 1. Tải Model và Processor ---
15
+ MODEL_ID = "sunbv56/qwen2.5-vl-vqa-vibook"
16
  print(f"🚀 Đang tải model '{MODEL_ID}' và processor...")
17
  try:
18
  dtype = torch.bfloat16 if torch.cuda.is_available() and torch.cuda.is_bf16_supported() else torch.float16
 
108
  with gr.Row(equal_height=False):
109
  with gr.Column(scale=1, min_width=350):
110
  gr.Markdown("### Bảng điều khiển")
111
+ image_input = gr.Image(type="pil", label="Tải ảnh lên", sources=["upload", "clipboard", "webcam"])
112
  gr.Markdown("---")
113
  gr.Markdown("### Ví dụ (Nhấn để chạy)")
114
  example_dataset = gr.Dataset(components=[gr.Image(visible=False), gr.Textbox(visible=False)], samples=example_list, label="Ví dụ", type="index")