Awiny commited on
Commit
09db30b
Β·
1 Parent(s): 80f89b9

full cpu support

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -45,7 +45,10 @@ def add_logo():
45
  logo_base64 = base64.b64encode(f.read()).decode()
46
  return logo_base64
47
 
48
- def process_image(image_src, options, processor):
 
 
 
49
  processor.args.semantic_segment = "Semantic Segment" in options
50
  image_generation_status = "Image Generation" in options
51
  image_caption, dense_caption, region_semantic, gen_text = processor.image_to_text(image_src)
 
45
  logo_base64 = base64.b64encode(f.read()).decode()
46
  return logo_base64
47
 
48
+ def process_image(image_src, options=None, processor=None):
49
+ print(options)
50
+ if options is None:
51
+ options = []
52
  processor.args.semantic_segment = "Semantic Segment" in options
53
  image_generation_status = "Image Generation" in options
54
  image_caption, dense_caption, region_semantic, gen_text = processor.image_to_text(image_src)