pan-yl commited on
Commit
34fed27
1 Parent(s): 01c1097
Files changed (1) hide show
  1. app.py +27 -27
app.py CHANGED
@@ -862,33 +862,33 @@ class ChatBotUI(object):
862
  return self.get_history(history), gr.update(value=''), gr.update(
863
  visible=False)
864
 
865
- # with self.eg:
866
- # self.example_task = gr.Text(label='Task Name',
867
- # value='',
868
- # visible=False)
869
- # self.example_image = gr.Image(label='Edit Image',
870
- # type='pil',
871
- # image_mode='RGB',
872
- # visible=False)
873
- # self.example_mask = gr.Image(label='Edit Image Mask',
874
- # type='pil',
875
- # image_mode='L',
876
- # visible=False)
877
- # self.example_ref_im1 = gr.Image(label='Ref Image',
878
- # type='pil',
879
- # image_mode='RGB',
880
- # visible=False)
881
-
882
- # self.examples = gr.Examples(
883
- # fn=run_example,
884
- # examples=self.chatbot_examples,
885
- # inputs=[
886
- # self.example_task, self.example_image, self.example_mask,
887
- # self.example_ref_im1, self.text, self.seed
888
- # ],
889
- # outputs=[self.chatbot, self.text, self.gallery],
890
- # examples_per_page=4,
891
- # run_on_click=True)
892
 
893
  ########################################
894
  def upload_image():
 
862
  return self.get_history(history), gr.update(value=''), gr.update(
863
  visible=False)
864
 
865
+ with self.eg:
866
+ self.example_task = gr.Text(label='Task Name',
867
+ value='',
868
+ visible=False)
869
+ self.example_image = gr.Image(label='Edit Image',
870
+ type='pil',
871
+ image_mode='RGB',
872
+ visible=False)
873
+ self.example_mask = gr.Image(label='Edit Image Mask',
874
+ type='pil',
875
+ image_mode='L',
876
+ visible=False)
877
+ self.example_ref_im1 = gr.Image(label='Ref Image',
878
+ type='pil',
879
+ image_mode='RGB',
880
+ visible=False)
881
+
882
+ self.examples = gr.Examples(
883
+ fn=run_example,
884
+ examples=self.chatbot_examples,
885
+ inputs=[
886
+ self.example_task, self.example_image, self.example_mask,
887
+ self.example_ref_im1, self.text, self.seed
888
+ ],
889
+ outputs=[self.chatbot, self.text, self.gallery],
890
+ examples_per_page=4,
891
+ run_on_click=True)
892
 
893
  ########################################
894
  def upload_image():