ysharma HF staff commited on
Commit
dc0e47a
1 Parent(s): 650bccb

Update app_dialogue.py

Browse files
Files changed (1) hide show
  1. app_dialogue.py +9 -5
app_dialogue.py CHANGED
@@ -519,7 +519,6 @@ def model_generation(
519
  return generated_text
520
 
521
  def process_example(message, image):
522
- print("********* process_example **********")
523
  clear_msg, image_value, chat = model_inference(
524
  user_prompt_str=message,
525
  chat_history=[],
@@ -553,7 +552,12 @@ textbox = gr.Textbox(
553
  container=False,
554
  label="Text input",
555
  )
556
- with gr.Blocks(title="IDEFICS-Chat", theme=gr.themes.Base()) as demo:
 
 
 
 
 
557
  gr.Markdown(
558
  """
559
  # IDEFICS
@@ -1047,9 +1051,9 @@ And so, the story of Mulan and Shrek's romance came to an end, leaving a lasting
1047
  # ],
1048
  ],
1049
  inputs=[textbox, imagebox],
1050
- outputs=[textbox, imagebox, chatbot],
1051
- fn=process_example,
1052
- cache_examples=True,
1053
  examples_per_page=5,
1054
  label="Click on any example below to get started",
1055
  )
 
519
  return generated_text
520
 
521
  def process_example(message, image):
 
522
  clear_msg, image_value, chat = model_inference(
523
  user_prompt_str=message,
524
  chat_history=[],
 
552
  container=False,
553
  label="Text input",
554
  )
555
+
556
+ css = """
557
+ #chatbot {background-image: url('https://e7.pngegg.com/pngimages/393/627/png-clipart-obelix-asterix-cartoon-comic-book-comics-asterix-and-obelix-comics-food.png');}
558
+ """
559
+
560
+ with gr.Blocks(title="IDEFICS-Chat", theme=gr.themes.Base(), css=css) as demo:
561
  gr.Markdown(
562
  """
563
  # IDEFICS
 
1051
  # ],
1052
  ],
1053
  inputs=[textbox, imagebox],
1054
+ #outputs=[textbox, imagebox, chatbot],
1055
+ #fn=process_example,
1056
+ #cache_examples=True,
1057
  examples_per_page=5,
1058
  label="Click on any example below to get started",
1059
  )