File size: 714 Bytes
c5902e3
b7393ba
c5902e3
 
 
 
 
 
b7393ba
 
 
 
2f2cf44
b7393ba
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import os
# os.system('pip install gradio==2.8.0b22')
import gradio as gr
clip = gr.Interface.load("spaces/DrishtiSharma/Text-to-Image-search-using-CLIP")
def text2image(text):
    image = clip(text)[0]
    return gr.processing_utils.decode_base64_to_image(image)

iface = gr.Interface(
    text2image,inputs=gr.inputs.Textbox(lines=2, placeholder="Enter your text here"),
    outputs="image",
    examples=[["cat"],["Lion"],["Nature"],["water"],["house"]],
    theme="dark-peach",
    #css="https://www.w3schools.com/cssref/playit.asp?filename=playcss_background-color",
    title='Image Generator',
    description="This application supports in the creation of images from your text.")
iface.launch(inline=False)