hotelvoicechat / app.py
prasanth345's picture
Update app.py
b28f06f verified
raw
history blame
530 Bytes
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)