Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from text_to_image import TextToImageTool
|
| 2 |
+
import gradio as gr
|
| 3 |
+
|
| 4 |
+
tool = TextToImageTool()
|
| 5 |
+
|
| 6 |
+
def fn(*args, **kwargs):
|
| 7 |
+
return tool(*args, **kwargs)
|
| 8 |
+
|
| 9 |
+
gr.Interface(
|
| 10 |
+
fn=fn,
|
| 11 |
+
inputs=tool.inputs,
|
| 12 |
+
outputs=tool.outputs,
|
| 13 |
+
title="TextToImageTool",
|
| 14 |
+
article=tool.description,
|
| 15 |
+
).queue(concurrency_count=5).launch()
|