Spaces:
Runtime error
Runtime error
| 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) |