fffiloni commited on
Commit
bdca464
1 Parent(s): b297a29

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -1
app.py CHANGED
@@ -53,9 +53,32 @@ article = """
53
 
54
  """
55
 
 
 
 
 
 
56
  prompt_input = gr.Textbox()
57
  image_init = gr.Image(source="upload", type="filepath")
58
  image_output = gr.Image()
59
 
60
  demo = gr.Interface(fn=infer, inputs=[prompt_input, image_init], outputs=image_output, title=title)
61
- demo.launch()
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
 
54
  """
55
 
56
+ css = '''
57
+ #col-container {max-width: 700px; margin-left: auto; margin-right: auto;}
58
+ a {text-decoration-line: underline; font-weight: 600;}
59
+ '''
60
+
61
  prompt_input = gr.Textbox()
62
  image_init = gr.Image(source="upload", type="filepath")
63
  image_output = gr.Image()
64
 
65
  demo = gr.Interface(fn=infer, inputs=[prompt_input, image_init], outputs=image_output, title=title)
66
+ demo.launch()
67
+
68
+
69
+ with gr.Blocks(css=css) as block:
70
+ with gr.Column(elem_id="col-container"):
71
+ gr.HTML(title)
72
+
73
+ prompt_input = gr.Textbox()
74
+ image_init = gr.Image(source="upload", type="filepath")
75
+
76
+ submit_btn = gr.Button("Submit")
77
+
78
+ image_output = gr.Image()
79
+
80
+ #gr.HTML(article)
81
+
82
+ submit_btn.click(fn=infer, inputs=[prompt_input,image_init], outputs=[image_output])
83
+
84
+ block.queue(max_size=32,concurrency_count=20).launch(show_api=False)