Update app.py
Browse files33 unmodified lines343536373738394041404142434445464847484951505152535554575855565733 unmodified lines gr.Slider(minimum=10, maximum=200, value=50, label="Max Length"), # Slider for max length gr.Slider(minimum=0.1, maximum=2.0, step=0.1, value=1.0, label="Temperature") # Slider for temperature ], outputs=[gr.Chatbot(label="Chat History")], # Single output for the chat history outputs=[gr.Chatbot(type="messages", label="Chat History")], # Use 'messages' type for the chat history live=True, # Enable live updates during input title="Chatbot Interface", description="A conversational interface with customizable settings.", theme="huggingface" # Theme for the interface description="A conversational interface with customizable settings." )
# Main interface layoutinterface = gr.Interface( fn=chatbot, inputs=[ gr.Chatbot(label="Chatbot"), # Chatbot UI gr.Chatbot(type="messages", label="Chatbot"), # Use 'messages' type for the chat history gr.Button(value="Settings") # Button to open the settings menu ], outputs=[gr.Chatbot()], outputs=[gr.Chatbot(type="messages")], live=True, # Live updates title="Chatbot Interface with Settings", description="Interact with a chatbot model and adjust settings for optimal interaction.", theme="huggingface", # Optional theme allow_flagging="never", # Disable flagging if not needed layout="vertical", # Organize the layout vertically css=".gradio-container { max-width: 100%; }" # Optional: to handle layout width)
# Add settings popup when button is clickedapp.py+4-8