Update app.py
Browse files33 unmodified lines3435363738394041424344454647484950515253545556575859606133 unmodified linesgr.Slider(minimum=10, maximum=200, value=50, label="Max Length"), # Slider for max lengthgr.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 historylive=True, # Enable live updates during inputtitle="Chatbot Interface",description="A conversational interface with customizable settings.",theme="huggingface" # Theme for the interface)# Main interface layoutinterface = gr.Interface(fn=chatbot,inputs=[gr.Chatbot(label="Chatbot"), # Chatbot UIgr.Button(value="Settings") # Button to open the settings menu],outputs=[gr.Chatbot()],live=True, # Live updatestitle="Chatbot Interface with Settings",description="Interact with a chatbot model and adjust settings for optimal interaction.",theme="huggingface", # Optional themeallow_flagging="never", # Disable flagging if not neededlayout="vertical", # Organize the layout verticallycss=".gradio-container { max-width: 100%; }" # Optional: to handle layout width)# Add settings popup when button is clicked33 unmodified lines34353637383940414243444546474849505152535455565733 unmodified linesgr.Slider(minimum=10, maximum=200, value=50, label="Max Length"), # Slider for max lengthgr.Slider(minimum=0.1, maximum=2.0, step=0.1, value=1.0, label="Temperature") # Slider for temperature],outputs=[gr.Chatbot(type="messages", label="Chat History")], # Use 'messages' type for the chat historylive=True, # Enable live updates during inputtitle="Chatbot Interface",description="A conversational interface with customizable settings.")# Main interface layoutinterface = gr.Interface(fn=chatbot,inputs=[gr.Chatbot(type="messages", label="Chatbot"), # Use 'messages' type for the chat historygr.Button(value="Settings") # Button to open the settings menu],outputs=[gr.Chatbot(type="messages")],live=True, # Live updatestitle="Chatbot Interface with Settings",description="Interact with a chatbot model and adjust settings for optimal interaction.",allow_flagging="never", # Disable flagging if not needed)# Add settings popup when button is clicked
app.py+4-8