# Examples in Chat Interface not appearing in HuggingFace Spaces

**URL:** <https://discuss.huggingface.co/t/examples-in-chat-interface-not-appearing-in-huggingface-spaces/116276>\
**Category:** Intermediate\
**Created:** [November 7, 2024, 7:01pm UTC](https://discuss.huggingface.co/t/examples-in-chat-interface-not-appearing-in-huggingface-spaces/116276 "2024-11-07T19:01:03Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PabloVD](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/pablovd/32/34178_2.png) [@PabloVD](https://discuss.huggingface.co/u/PabloVD)\
**Post date:** [November 7, 2024, 7:01pm UTC](https://discuss.huggingface.co/t/examples-in-chat-interface-not-appearing-in-huggingface-spaces/116276/1 "2024-11-07T19:01:03Z")

</div>

I have a gradio app of a chatbot with some example questions. It works fine locally, but when I upload to HuggingFace Spaces, the example questions do not appear. That happens even if I force to use the same gradio version putting it in the requirements.txt.

Here is the section of the code where gradio components are defined:

```python
# Predefined messages and examples
description = "AI powered assistant which answers any question related to the [CAMELS simulations](https://www.camel-simulations.org/)."
greetingsmessage = "Hi, I'm the CAMELS DocBot, I'm here to assist you with any question related to the CAMELS simulations."
example_questions = [
                    "How can I read a halo file?",
                    "Which simulation suites are included in CAMELS?",
                    "Which are the largest volumes in CAMELS simulations?",
                    "Write a complete snippet of code getting the power spectrum of a simulation"
                     ]

# Define customized Gradio chatbot
chatbot = gr.Chatbot([{"role":"assistant", "content":greetingsmessage}],
                     type="messages",
                     avatar_images=["ims/userpic.png","ims/camelslogo.jpg"],
                     height="60vh")

# Define Gradio interface
demo = gr.ChatInterface(handle_prompt,
                        type="messages",
                        title="CAMELS DocBot",
                        fill_height=True,
                        examples=example_questions,
                        theme=gr.themes.Soft(),
                        description=description,
                        cache_examples=False,
                        chatbot=chatbot)

demo.launch()

```

The full code can be found [here](https://huggingface.co/spaces/PabloVD/CAMELSDocBot)

---

<div class="post-metadata">

**Author:** ![PabloVD](https://sea2.discourse-cdn.com/hellohellohello/user_avatar/discuss.huggingface.co/pablovd/32/34178_2.png) [@PabloVD](https://discuss.huggingface.co/u/PabloVD)\
**Post date:** [November 7, 2024, 7:57pm UTC](https://discuss.huggingface.co/t/examples-in-chat-interface-not-appearing-in-huggingface-spaces/116276/2 "2024-11-07T19:57:44Z")

</div>

I fixed the issue by explicitly writing the latest Gradio version in the README.md in HuggingFace Spaces rather than in the requirements:  
`sdk_version: 5.5.0`

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/hellohellohello/original/2X/d/de4155eb4aa4108ecb32a1389d7cc37ae69f88b7.png) [@system](https://discuss.huggingface.co/u/system)\
**Post date:** [November 8, 2024, 7:58am UTC](https://discuss.huggingface.co/t/examples-in-chat-interface-not-appearing-in-huggingface-spaces/116276/3 "2024-11-08T07:58:07Z")

</div>

This topic was automatically closed 12 hours after the last reply. New replies are no longer allowed.
