speech-test commited on
Commit
4556b47
·
1 Parent(s): 650ec6e

Enable queue

Browse files
Files changed (1) hide show
  1. app.py +7 -5
app.py CHANGED
@@ -31,12 +31,13 @@ def dalle_wrapper(prompt: str):
31
 
32
 
33
  translator = gr.Interface.load("huggingface/facebook/wmt19-en-ru",
34
- inputs=[gr.inputs.Textbox(label="What would you like to see?")])
 
35
  outputs = [
36
  gr.outputs.HTML(label=""),
37
  gr.outputs.Image(label=""),
38
  ]
39
- generator = gr.Interface(fn=dalle_wrapper, inputs="text", outputs=outputs)
40
 
41
 
42
  description = (
@@ -50,10 +51,11 @@ article = (
50
  "<a href='https://habr.com/ru/company/sberbank/blog/586926/'>Article (in Russian)</a>"
51
  "</p>"
52
  )
53
- examples = [["A white cat sitting in a cardboard box"],
54
  ["Город в стиле киберпанк"],
55
- ["A colorful photo of coral reef"]]
56
-
 
57
  series = Series(translator, generator,
58
  title='Kinda-English ruDALL-E',
59
  description=description,
 
31
 
32
 
33
  translator = gr.Interface.load("huggingface/facebook/wmt19-en-ru",
34
+ inputs=[gr.inputs.Textbox(label="What would you like to see?")],
35
+ enable_queue=True)
36
  outputs = [
37
  gr.outputs.HTML(label=""),
38
  gr.outputs.Image(label=""),
39
  ]
40
+ generator = gr.Interface(fn=dalle_wrapper, inputs="text", outputs=outputs, enable_queue=True)
41
 
42
 
43
  description = (
 
51
  "<a href='https://habr.com/ru/company/sberbank/blog/586926/'>Article (in Russian)</a>"
52
  "</p>"
53
  )
54
+ examples = [["A still life of grapes and a bottle of wine"],
55
  ["Город в стиле киберпанк"],
56
+ ["A colorful photo of coral reef"],
57
+ ["A white cat sitting in a cardboard box"]]
58
+
59
  series = Series(translator, generator,
60
  title='Kinda-English ruDALL-E',
61
  description=description,