Coloring's picture
feat: update
1969c22
raw
history blame
1.78 kB
import os
import gradio as gr
import modelscope_studio.components.antd as antd
import modelscope_studio.components.base as ms
with gr.Blocks() as demo:
with ms.Application():
with antd.ConfigProvider():
antd.Image(
"https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png",
width=200)
antd.Image(
"https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png",
preview=False,
width=200)
antd.Image(
os.path.join(os.path.dirname(__file__),
"../resources/modelscope.png"))
antd.Divider("Multiple image preview")
with antd.Image.PreviewGroup():
antd.Image(
"https://gw.alipayobjects.com/zos/rmsportal/KDpgvguMpGfqaHPjicRK.svg",
width=200)
antd.Image(
"https://gw.alipayobjects.com/zos/antfincdn/aPkFc8Sj7n/method-draw-image.svg",
width=200)
antd.Divider("Preview from one image")
with antd.Image.PreviewGroup(items=[
'https://gw.alipayobjects.com/zos/antfincdn/LlvErxo8H9/photo-1503185912284-5271ff81b9a8.webp',
'https://gw.alipayobjects.com/zos/antfincdn/cV16ZqzMjW/photo-1473091540282-9b846e7965e3.webp',
'https://gw.alipayobjects.com/zos/antfincdn/x43I27A55%26/photo-1438109491414-7198515b166b.webp',
]):
antd.Image(
"https://gw.alipayobjects.com/zos/antfincdn/LlvErxo8H9/photo-1503185912284-5271ff81b9a8.webp",
width=200)
if __name__ == "__main__":
demo.queue().launch()