Freiburg-AI-Research commited on
Commit
86570a6
Β·
1 Parent(s): cc0b231

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -236,7 +236,8 @@ def sample(prompt):
236
  image = get_images(up_samples)
237
  # image = to_base64(image)
238
  # return {"image": image}
239
- return image
 
240
 
241
 
242
 
@@ -248,7 +249,7 @@ examples =["melanoma"]
248
 
249
  iface = gr.Interface(fn=sample,
250
  inputs=gr.inputs.Textbox(label='Which dermoscopic entity would you like to see? Choose one of the following one: "melanoma", "melanocytic nevi", "Actinic keratoses and intraepithelial carcinoma / Bowen disease, "benign keratosis-like lesions (solar lentigines / seborrheic keratoses and lichen-planus like keratoses", "basal cell carcinoma", "dermatofibroma", "vascular lesions"'),
251
- outputs=gr.outputs.Image(type="pil", label="Model input + completions").style(height=256, width=256),
252
  title=title,
253
  description=description,
254
  article=article,
 
236
  image = get_images(up_samples)
237
  # image = to_base64(image)
238
  # return {"image": image}
239
+ resized_image = image.resize((128, 128), Image.ANTIALIAS)
240
+ return resized_image
241
 
242
 
243
 
 
249
 
250
  iface = gr.Interface(fn=sample,
251
  inputs=gr.inputs.Textbox(label='Which dermoscopic entity would you like to see? Choose one of the following one: "melanoma", "melanocytic nevi", "Actinic keratoses and intraepithelial carcinoma / Bowen disease, "benign keratosis-like lesions (solar lentigines / seborrheic keratoses and lichen-planus like keratoses", "basal cell carcinoma", "dermatofibroma", "vascular lesions"'),
252
+ outputs=gr.outputs.Image(type="pil", label="Model input + completions").style(height=128, width=128),
253
  title=title,
254
  description=description,
255
  article=article,