Update app.py

#4
by davanstrien HF staff - opened
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -20,12 +20,12 @@ os.environ["HF_HUB_ENABLE_HF_TRANSFER"] = "1"
20
 
21
 
22
  model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
23
- "Qwen/Qwen2.5-VL-3B-Instruct",
24
  torch_dtype=torch.bfloat16,
25
  attn_implementation="flash_attention_2",
26
  device_map="auto",
27
  )
28
- processor = AutoProcessor.from_pretrained("Qwen/Qwen2.5-VL-3B-Instruct")
29
 
30
 
31
  class GeneralRetrievalQuery(BaseModel):
@@ -157,7 +157,7 @@ examples = [
157
  demo = gr.Interface(
158
  fn=generate_response,
159
  inputs=gr.Image(type="pil"),
160
- outputs=gr.Json(),
161
  title=title,
162
  description=description,
163
  examples=examples,
 
20
 
21
 
22
  model = Qwen2_5_VLForConditionalGeneration.from_pretrained(
23
+ "Qwen/Qwen2.5-VL-7B-Instruct",
24
  torch_dtype=torch.bfloat16,
25
  attn_implementation="flash_attention_2",
26
  device_map="auto",
27
  )
28
+ processor = AutoProcessor.from_pretrained("Qwen/Qwen2.5-VL-7B-Instruct")
29
 
30
 
31
  class GeneralRetrievalQuery(BaseModel):
 
157
  demo = gr.Interface(
158
  fn=generate_response,
159
  inputs=gr.Image(type="pil"),
160
+ outputs=gr.Text(),
161
  title=title,
162
  description=description,
163
  examples=examples,