text: Title: gradio demo don't work in huggingface space
  Body: ### Describe the bug
  
  when deploying demo code of doc on huggingface space, it will produce a bug "gradio.exceptions.error: 'data incompatible with the messages format'". Because the version of gradio is 5.0.1 when deploying and can not change, I can not fix it by updating the version. After trying, find if I change the code 【chatbot=gr.Chatbot(height=300)】 -> 【chatbot=gr.Chatbot(height=300, type="messages")], the bug will be fixed.
  
  ### Have you searched existing issues?  🔎
  
  - [x] I have searched and found no existing issues
  
  ### Reproduction
  
  ```python
  import gradio as gr
  
  def slow_echo(message, history):
      for i in range(len(message)):
          time.sleep(0.3)
          yield "You typed: " + message[: i+1]
  
  gr.ChatInterface(
      slow_echo,
      type="messages",
      chatbot=gr.Chatbot(height=300),
      textbox=gr.Textbox(placeholder="Ask me a yes or no question", container=False, scale=7),
      title="Yes Man",
      description="Ask Yes Man any question",
      theme="ocean",
      examples=["Hello", "Am I cool?", "Are tomatoes vegetables?"],
      cache_examples=True,
  ).launch()
  ```
  
  
  ### Screenshot
  
  _No response_
  
  ### Logs
  
  ```shell
  
  ```
  
  ### System Info
  
  ```shell
  gradio==5.0.1
  ```
  
  ### Severity
  
  I can work around it