Spaces:
Runtime error
Runtime error
app.py
CHANGED
@@ -12,24 +12,24 @@ def engine(text_input):
|
|
12 |
#entities_num = len(entities)
|
13 |
|
14 |
#img = run(text_input,'50','256','256','1',10) #entities[0][0]
|
15 |
-
|
16 |
-
img_intfc = gr.Interface.load("spaces/multimodalart/latentdiffusion")
|
17 |
#img_intfc = gr.Interface.load("spaces/multimodalart/latentdiffusion", inputs=[gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text")],
|
18 |
#outputs=[gr.outputs.Image(type="pil", label="output image"),gr.outputs.Carousel(label="Individual images",components=["image"]),gr.outputs.Textbox(label="Error")], )
|
19 |
#title="Convert text to image")
|
20 |
#img = img_intfc[0]
|
21 |
-
img = img_intfc(text_input,'50','256','256','1',10)
|
22 |
-
print(
|
23 |
-
print(type(
|
24 |
-
print(len(img[1]))
|
25 |
-
print(type(img[1][0][0]))
|
26 |
#print(img[1])
|
27 |
#img = img[0]
|
28 |
#inputs=['George',50,256,256,1,10]
|
29 |
#run(prompt, steps, width, height, images, scale)
|
30 |
|
31 |
#speech = text2speech(text_input)
|
32 |
-
return
|
33 |
|
34 |
image = gr.outputs.Image(type="pil", label="output image")
|
35 |
app = gr.Interface(fn=engine,
|
@@ -37,7 +37,7 @@ app = gr.Interface(fn=engine,
|
|
37 |
#live=True,
|
38 |
description="Takes a text as input and reads it out to you.",
|
39 |
#outputs=[#gr.outputs.Textbox(type="auto", label="Text"),gr.outputs.Audio(type="file", label="Speech Answer"),
|
40 |
-
|
41 |
examples = ['Apple']
|
42 |
#examples=["On April 17th Sunday George celebrated Easter. He is staying at Empire State building with his parents. He is a citizen of Canada and speaks English and French fluently. His role model is former president Obama. He got 1000 dollar from his mother to visit Disney World and to buy new iPhone mobile. George likes watching Game of Thrones."]
|
43 |
).launch(debug=True) #(enable_queue=True)
|
|
|
12 |
#entities_num = len(entities)
|
13 |
|
14 |
#img = run(text_input,'50','256','256','1',10) #entities[0][0]
|
15 |
+
inputs = [text_input,'50','256','256','1',10]
|
16 |
+
img_intfc = gr.Interface.load("spaces/multimodalart/latentdiffusion", inputs=inputs).launch()
|
17 |
#img_intfc = gr.Interface.load("spaces/multimodalart/latentdiffusion", inputs=[gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text"), gr.inputs.Textbox(lines=1, label="Input Text")],
|
18 |
#outputs=[gr.outputs.Image(type="pil", label="output image"),gr.outputs.Carousel(label="Individual images",components=["image"]),gr.outputs.Textbox(label="Error")], )
|
19 |
#title="Convert text to image")
|
20 |
#img = img_intfc[0]
|
21 |
+
#img = img_intfc(text_input,'50','256','256','1',10)
|
22 |
+
print(img_intfc)
|
23 |
+
print(type(img_intfc))
|
24 |
+
#print(len(img[1]))
|
25 |
+
#print(type(img[1][0][0]))
|
26 |
#print(img[1])
|
27 |
#img = img[0]
|
28 |
#inputs=['George',50,256,256,1,10]
|
29 |
#run(prompt, steps, width, height, images, scale)
|
30 |
|
31 |
#speech = text2speech(text_input)
|
32 |
+
return img_intfc #entities, speech, img
|
33 |
|
34 |
image = gr.outputs.Image(type="pil", label="output image")
|
35 |
app = gr.Interface(fn=engine,
|
|
|
37 |
#live=True,
|
38 |
description="Takes a text as input and reads it out to you.",
|
39 |
#outputs=[#gr.outputs.Textbox(type="auto", label="Text"),gr.outputs.Audio(type="file", label="Speech Answer"),
|
40 |
+
outputs= image, #gr.outputs.Carousel(label="Individual images",components=["image"]), #, gr.outputs.Textbox(label="Error")],
|
41 |
examples = ['Apple']
|
42 |
#examples=["On April 17th Sunday George celebrated Easter. He is staying at Empire State building with his parents. He is a citizen of Canada and speaks English and French fluently. His role model is former president Obama. He got 1000 dollar from his mother to visit Disney World and to buy new iPhone mobile. George likes watching Game of Thrones."]
|
43 |
).launch(debug=True) #(enable_queue=True)
|