RunningYou commited on
Commit
508878c
1 Parent(s): 06cac1e
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -105,13 +105,13 @@ def predict2(dict, prompt, num_samples):
105
  image_input = gr.Image(source='upload', tool='sketch', type='pil')
106
  prompt = gr.Textbox(label='prompt')
107
  number = gr.Slider(1, 4, value=2, label='num_samples')
108
-
109
- init = {'image': PIL.Image.open(os.path.join(os.path.dirname(__file__), 'example1.png')),
110
- 'mask': PIL.Image.open(os.path.join(os.path.dirname(__file__), 'example1_mask.png'))}
111
- examples = [[init, 'a bench in a field', 2]]
112
  greeter_1 = gr.Interface(predict1, inputs=[image_input, prompt, number], outputs=gr.Image(label='auto'))
113
  greeter_2 = gr.Interface(predict2, inputs=[image_input, prompt, number], outputs=gr.Image(label='paint'))
114
- demo = gr.Parallel(greeter_1, greeter_2, examples=examples)
115
 
116
  if __name__ == "__main__":
117
  demo.launch(enable_queue=True)
 
105
  image_input = gr.Image(source='upload', tool='sketch', type='pil')
106
  prompt = gr.Textbox(label='prompt')
107
  number = gr.Slider(1, 4, value=2, label='num_samples')
108
+ #
109
+ # init = {'image': PIL.Image.open(os.path.join(os.path.dirname(__file__), 'example1.png')),
110
+ # 'mask': PIL.Image.open(os.path.join(os.path.dirname(__file__), 'example1_mask.png'))}
111
+ # examples = [[init, 'a bench in a field', 2]]
112
  greeter_1 = gr.Interface(predict1, inputs=[image_input, prompt, number], outputs=gr.Image(label='auto'))
113
  greeter_2 = gr.Interface(predict2, inputs=[image_input, prompt, number], outputs=gr.Image(label='paint'))
114
+ demo = gr.Parallel(greeter_1, greeter_2)
115
 
116
  if __name__ == "__main__":
117
  demo.launch(enable_queue=True)