RamAnanth1 commited on
Commit
06c64f4
1 Parent(s): 77095ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -4,12 +4,11 @@ import torch
4
 
5
  device = torch.device("cuda") if torch.cuda.is_available() else "cpu"
6
 
7
-
8
  model_name = "blip2_t5_instruct"
9
  model_type = "flant5xl"
10
  model, vis_processors, _ = load_model_and_preprocess(
11
- name=args.model_name,
12
- model_type=args.model_type,
13
  is_eval=True,
14
  device=device,
15
  )
@@ -47,6 +46,11 @@ theme = gr.themes.Monochrome(
47
  css = ".generating {visibility: hidden}"
48
 
49
  with gr.Blocks(theme=theme, analytics_enabled=False,css=css) as demo:
 
 
 
 
 
50
  with gr.Column(scale=3):
51
  image_input = gr.Image(type="pil")
52
  prompt_textbox = gr.Textbox(label="Prompt:", placeholder="prompt", lines=2)
 
4
 
5
  device = torch.device("cuda") if torch.cuda.is_available() else "cpu"
6
 
 
7
  model_name = "blip2_t5_instruct"
8
  model_type = "flant5xl"
9
  model, vis_processors, _ = load_model_and_preprocess(
10
+ name=model_name,
11
+ model_type=model_type,
12
  is_eval=True,
13
  device=device,
14
  )
 
46
  css = ".generating {visibility: hidden}"
47
 
48
  with gr.Blocks(theme=theme, analytics_enabled=False,css=css) as demo:
49
+ gr.Markdown(
50
+ """
51
+ Unofficial demo for InstructBLIP. InstructBLIP is a new vision-language instruction-tuning framework by Salesforce that uses BLIP-2 models, achieving state-of-the-art zero-shot generalization performance on a wide range of vision-language tasks.
52
+ """
53
+ )
54
  with gr.Column(scale=3):
55
  image_input = gr.Image(type="pil")
56
  prompt_textbox = gr.Textbox(label="Prompt:", placeholder="prompt", lines=2)