gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
33.79k stars 2.56k forks source link

Slider not set at default value at launch when used with chatbot #829

Closed tareknaous closed 2 years ago

tareknaous commented 2 years ago

Describe the bug

I was building a demo for a DialoGPT-based chatbot model and used the chatbot output component. As inputs I created sliders to set the probability and temperature values for nucleus sampling and set default values for them (0.9 and 1 respectively). However:

image

Reproduction

The code used:

iface = gr.Interface(
    chat,
    inputs =["text", "state",
             gr.inputs.Slider(0.1, 1, step=0.1, label='Top-p', default=0.9),
             gr.inputs.Slider(0.1, 3, step=0.1, label='Temperature', default=1)],
    outputs = ["chatbot", "state"],
    allow_screenshot=False,
    allow_flagging="never",
    title=title,
    description=description
)
iface.launch(debug=True)

Screenshot

No response

Logs

No response

System Info

Gradio version: 2.8.10
Operating system: Windows 10
Browser: google chrome

Severity

annoyance

abidlabs commented 2 years ago

Hi @tareknaous I can confirm that this is now fixed. If you'd like, you can test it in our beta release: pip install gradio==2.9b8