Spaces:
Runtime error
Runtime error
Freiburg-AI-Research
commited on
Commit
Β·
b12acb0
1
Parent(s):
fa54bae
Update app.py
Browse files
app.py
CHANGED
@@ -1,3 +1,5 @@
|
|
|
|
|
|
1 |
|
2 |
import os
|
3 |
os.system('pip install -e .')
|
@@ -240,12 +242,12 @@ def to_base64(pil_image):
|
|
240 |
return base64.b64encode(buffered.getvalue())
|
241 |
|
242 |
title = "Interactive demo: glide-text2im dermoscopic image generator"
|
243 |
-
description =
|
244 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2112.10741'>GLIDE: Towards Photorealistic Image Generation and Editing with Text-Guided Diffusion Models</a> | <a href='https://github.com/openai/glide-text2im/'>Official Repo</a></p>"
|
245 |
examples =["melanoma"]
|
246 |
|
247 |
iface = gr.Interface(fn=sample,
|
248 |
-
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
|
249 |
outputs=gr.outputs.Image(type="pil", label="Model input + completions"),
|
250 |
title=title,
|
251 |
description=description,
|
|
|
1 |
+
#credits to Valhalla for his space: https://huggingface.co/spaces/valhalla/glide-text2im that was used to build this app.
|
2 |
+
#credits to the researchers of OpenAI for providing the text2img algorithm
|
3 |
|
4 |
import os
|
5 |
os.system('pip install -e .')
|
|
|
242 |
return base64.b64encode(buffered.getvalue())
|
243 |
|
244 |
title = "Interactive demo: glide-text2im dermoscopic image generator"
|
245 |
+
description = 'Demo for the Finetuned version of OpenAI's GLIDE: Towards Photorealistic Image Generation and Editing with Text-Guided Diffusion Models. Please be aware that generation of the image will take up to 20 minutes, as CPU is used for the generation. Please cite our research paper with the title "Finetuning of GLIDE stable diffusion model for AI-based text-conditional image synthesis of dermoscopic images"'
|
246 |
article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2112.10741'>GLIDE: Towards Photorealistic Image Generation and Editing with Text-Guided Diffusion Models</a> | <a href='https://github.com/openai/glide-text2im/'>Official Repo</a></p>"
|
247 |
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"),
|
252 |
title=title,
|
253 |
description=description,
|