File size: 1,081 Bytes
cd1d66e 28d4015 cd1d66e 8f60e3d cd1d66e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
#!/usr/bin/env python
# coding: utf-8
# In[5]:
import numpy as np
import gradio as gr
from Era_s20_updt import generate_final_image
gr.Interface(
generate_final_image,
inputs=[
#gr.Image(label="Input Image"),
gr.Image(type='pil', label="Guided Image for Loss"),
gr.Text(label="Input Prompt")
#gr.Slider(0, 1, value=0.5, label="IOU Threshold"),
#gr.Slider(0, 1, value=0.4, label="Threshold"),
#gr.Checkbox(label="Show Grad Cam"),
#gr.Slider(0, 1, value=0.5, label="Opacity of GradCAM"),
],
outputs =
[
gr.Gallery(rows=2, columns=1),
gr.Gallery(rows=2, columns=1),
gr.Gallery(rows=2, columns=1),
gr.Gallery(rows=2, columns=1),
# gr.Gallery(rows=2, columns=1),
# gr.Gallery(rows=2, columns=1),
# gr.Gallery(rows=2, columns=1),
# gr.Gallery(rows=2, columns=1),
# gr.Gallery(rows=2, columns=1),
# gr.Gallery(rows=2, columns=1)
],
title="Stable Diffusion",
layout="Vertical"
).launch()
|