File size: 798 Bytes
172362f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr
from PIL import Image
import requests

url1 = "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcR2b2MLoVSTb0tF312bh0HNeFyMPW5w1VV6KZ7yyKw6wx4n7A2uvYaSQkGjsx49yKaKuvU&usqp=CAU"
url2 = "https://cdn.bizwnews.com/news/photo/202310/67109_71665_5855.jpg"
url3 = "https://wimg.mk.co.kr/news/cms/202306/28/news-p.v1.20230628.118f551f4481418398049c100db5ef16_P1.jpg"

image1 = Image.open(requests.get(url1, stream=True).raw)
image2 = Image.open(requests.get(url2, stream=True).raw)
image3 = Image.open(requests.get(url3, stream=True).raw)
demo = gr.Interface(fn=sepia,
                    inputs=gr.Image(shape=(400, 600)),
                    outputs=['plot'],
                    examples=["image1", "image2", "image3"],
                    allow_flagging='never')


demo.launch()