from flask import Flask, render_template, request import gradio as gr app = Flask(__name__) @app.route('/') def home(): return render_templates('index.html') @app.route('/chat') def chat(): def chatbot(input_text): return {"output": f"Your input was: {input_text}"} iface = gr.Interface( fn=chatbot, inputs=gr.Textbox(), outputs=gr.Textbox(label="Response"), title="Hotel Booking Chatbot", ) return iface.launch() if __name__ == '__main__': app.run(debug=True)