File size: 417 Bytes
ac5a8f8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# Imports
from text_to_image import TextToImageTool
import gradio as gr

# Define Text to Image Tool
tool = TextToImageTool()

# Helper Function, necessary for Gradio
def fn(*args, **kwargs):
    return tool(*args, **kwargs)

# Gradio Interface 
gr.Interface(
    fn=fn,
    inputs=tool.inputs,
    outputs=tool.outputs,
    title="TextToImageTool",
    article=tool.description,
).queue(concurrency_count=5).launch()