Spaces:
Runtime error
Runtime error
File size: 530 Bytes
87df5c7 b28f06f 87df5c7 b28f06f 87df5c7 b28f06f 87df5c7 b28f06f 87df5c7 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
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)
|