ysharma HF staff commited on
Commit
856b53c
1 Parent(s): 408d22a
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -12,15 +12,15 @@ def engine(text_input):
12
  #entities_num = len(entities)
13
 
14
  #img = run(text_input,'50','256','256','1',10) #entities[0][0]
15
- img_intfc = gr.Interface.load("spaces/multimodalart/latentdiffusion").launch() #inputs={'prompt':text_input,'steps':'50','width':'256','height':'256','images':'1','scale':10}).launch()
16
  #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")],
17
  #outputs=[gr.outputs.Image(type="pil", label="output image"),gr.outputs.Carousel(label="Individual images",components=["image"]),gr.outputs.Textbox(label="Error")], )
18
  #title="Convert text to image")
19
  #img = img_intfc[0]
20
- img = img_intfc(text_input,'50','256','256','1',10)
21
  print(img_intfc)
22
  print(type(img_intfc))
23
- print(img)
24
  #print(type(img[1][0][0]))
25
  #print(img[1])
26
  #img = img[0]
@@ -28,7 +28,7 @@ def engine(text_input):
28
  #run(prompt, steps, width, height, images, scale)
29
 
30
  #speech = text2speech(text_input)
31
- return img #entities, speech, img
32
 
33
  image = gr.outputs.Image(type="pil", label="output image")
34
  app = gr.Interface(fn=engine,
 
12
  #entities_num = len(entities)
13
 
14
  #img = run(text_input,'50','256','256','1',10) #entities[0][0]
15
+ img_intfc = gr.Interface.load("spaces/multimodalart/latentdiffusion").launch()(text_input,'50','256','256','1',10) #inputs={'prompt':text_input,'steps':'50','width':'256','height':'256','images':'1','scale':10}).launch()
16
  #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")],
17
  #outputs=[gr.outputs.Image(type="pil", label="output image"),gr.outputs.Carousel(label="Individual images",components=["image"]),gr.outputs.Textbox(label="Error")], )
18
  #title="Convert text to image")
19
  #img = img_intfc[0]
20
+ #img = img_intfc(text_input,'50','256','256','1',10)
21
  print(img_intfc)
22
  print(type(img_intfc))
23
+ #print(img)
24
  #print(type(img[1][0][0]))
25
  #print(img[1])
26
  #img = img[0]
 
28
  #run(prompt, steps, width, height, images, scale)
29
 
30
  #speech = text2speech(text_input)
31
+ return img_intfc #entities, speech, img
32
 
33
  image = gr.outputs.Image(type="pil", label="output image")
34
  app = gr.Interface(fn=engine,