import gradio as gr import random import time theme = gr.themes.Base( secondary_hue="gray", ) with gr.Blocks(theme=theme) as demo: chatbot = gr.Chatbot(label="SRF Interactive Chatbot",show_share_button="true") msg = gr.Textbox(label="Ask me any question",placeholder="Send us a message") btn = gr.Button(value="Submit") clear = gr.ClearButton([msg, chatbot]) def respond(message, chat_history): bot_message = random.choice(["The ESG report provides a holistic overview of our sustainable and responsible approach to creating long-term value for our stakeholders, including customers, investors, employees, communities, etc., and sustainably leading our business operations. It reflects the financial and non-financial performance of SRF Limited highlighting the current system, processes, performance and initiatives undertaken in the reporting period.", "SRF Limited is committed towards building an organisation that is focussed on long-term sustainable growth and development. We believe our ESG journey is inherently a collaborative one, inclusive of planet, people, and profit. This section of the report reflects our commitments, current systems, performance, and initiatives undertaken by SRF for mainstreaming ESG in our business activities. The report provides standalone nonfinancial information on SRF Limited and covers the period from April 1, 2022 to March 31, 2023.", "The report is aligned with the ‘Guiding Principles’ and the ‘Content Elements’ of the International Integrated Reporting Council’s (IIRC) framework. The content also conforms to the Global Reporting Initiative (GRI) standard."]) chat_history.append((message, bot_message)) time.sleep(2) return "", chat_history btn.click(respond, [msg, chatbot], [msg, chatbot]) if __name__ == "__main__": demo.launch()