Spaces:
Runtime error
Runtime error
Commit
·
5db3d86
1
Parent(s):
f640be4
Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,14 @@
|
|
1 |
-
from transformers.tools.base import launch_gradio_demo
|
2 |
from text_to_image import TextToImageTool
|
3 |
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from text_to_image import TextToImageTool
|
2 |
|
3 |
+
tool = tool_class()
|
4 |
+
|
5 |
+
def fn(*args, **kwargs):
|
6 |
+
return tool(*args, **kwargs)
|
7 |
+
|
8 |
+
gr.Interface(
|
9 |
+
fn=fn,
|
10 |
+
inputs=tool_class.inputs,
|
11 |
+
outputs=tool_class.outputs,
|
12 |
+
title=tool_class.__name__,
|
13 |
+
article=tool.description,
|
14 |
+
).queue(concurrency_count=5).launch()
|