Spaces:
Sleeping
Sleeping
aaaaa
Browse files55 unmodified lines56575859606156 unmodified lines11811912012112212312412512612712812955 unmodified linesdef cancel_inference():global stop_inferencestop_inference = True# Custom CSS for a fancy lookcustom_css = """56 unmodified lineslabel="Top-p (nucleus sampling)",),gr.Checkbox(label="Use Local Model", value=False),gr.Button("Cancel Inference", variant="danger", on_click=cancel_inference),],css=custom_css,title="π Fancy AI Chatbot π",description="Interact with the AI chatbot using customizable settings below.")if __name__ == "__main__":demo.launch()55 unmodified lines5657585960616256 unmodified lines11912012112212312412512612712812913013113213355 unmodified linesdef cancel_inference():global stop_inferencestop_inference = Truereturn gr.update(label="Inference cancelled.")# Custom CSS for a fancy lookcustom_css = """56 unmodified lineslabel="Top-p (nucleus sampling)",),gr.Checkbox(label="Use Local Model", value=False),gr.Button("Cancel Inference"),],css=custom_css,title="π Fancy AI Chatbot π",description="Interact with the AI chatbot using customizable settings below.")cancel_button = demo.add_button("Cancel Inference", variant="danger", elem_id="cancel_button")cancel_button.click(cancel_inference, None, None)if __name__ == "__main__":demo.launch()
app.py+5-1