sigyllly commited on
Commit
b09d090
1 Parent(s): 34d3f77

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -12,6 +12,10 @@ model = CLIPSegForImageSegmentation.from_pretrained("CIDAS/clipseg-rd64-refined"
12
 
13
  app = Flask(__name__)
14
 
 
 
 
 
15
  def process_image(image, prompt):
16
  inputs = processor(
17
  text=prompt, images=image, padding="max_length", return_tensors="pt"
@@ -90,6 +94,7 @@ with gr.Blocks() as demo:
90
  ],
91
  outputs=[output_image, output_mask],
92
  )
 
93
  def run_demo():
94
  demo.launch()
95
 
 
12
 
13
  app = Flask(__name__)
14
 
15
+
16
+ # Define article as a global variable
17
+ article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2112.10003'>CLIPSeg: Image Segmentation Using Text and Image Prompts</a> | <a href='https://huggingface.co/docs/transformers/main/en/model_doc/clipseg'>HuggingFace docs</a></p>"
18
+
19
  def process_image(image, prompt):
20
  inputs = processor(
21
  text=prompt, images=image, padding="max_length", return_tensors="pt"
 
94
  ],
95
  outputs=[output_image, output_mask],
96
  )
97
+
98
  def run_demo():
99
  demo.launch()
100