JuanMa360 commited on
Commit
3df1923
·
1 Parent(s): 31a8ed3

refactor: pool

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,4 +1,5 @@
1
  from PIL import Image
 
2
  import gradio as gr
3
  import requests
4
  from transformers import CLIPProcessor, CLIPModel, pipeline, BlipProcessor, BlipForConditionalGeneration
@@ -169,7 +170,7 @@ def generate_answer(image):
169
  is_render = calculate_is_render(processed_image)
170
  image_data["is_render"] = is_render
171
 
172
- return image_data
173
 
174
 
175
  image_input = gr.Image(type="pil", label="Upload Image")
 
1
  from PIL import Image
2
+ import json
3
  import gradio as gr
4
  import requests
5
  from transformers import CLIPProcessor, CLIPModel, pipeline, BlipProcessor, BlipForConditionalGeneration
 
170
  is_render = calculate_is_render(processed_image)
171
  image_data["is_render"] = is_render
172
 
173
+ return json.dumps(images_data, indent=4)
174
 
175
 
176
  image_input = gr.Image(type="pil", label="Upload Image")