prasanth345 commited on
Commit
d5f1ff9
·
verified ·
1 Parent(s): 58a6707

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -22
app.py CHANGED
@@ -1,24 +1,14 @@
1
- from flask import Flask, render_templates, request
2
  import gradio as gr
3
 
4
- app = Flask(__name__)
5
-
6
- @app.route('/')
7
- def home():
8
- return render_templates('index.html')
9
-
10
- @app.route('/chat')
11
- def chat():
12
- def chatbot(input_text):
13
- return {"output": f"Your input was: {input_text}"}
14
-
15
- iface = gr.Interface(
16
- fn=chatbot,
17
- inputs=gr.Textbox(),
18
- outputs=gr.Textbox(label="Response"),
19
- title="Hotel Booking Chatbot",
20
- )
21
- return iface.launch()
22
-
23
- if __name__ == '__main__':
24
- app.run(debug=True)
 
 
1
  import gradio as gr
2
 
3
+ def chatbot_response(text):
4
+ # Placeholder for actual AI logic
5
+ return f"You said: {text}"
6
+
7
+ # Create Gradio interface
8
+ gr.Interface(
9
+ fn=chatbot_response,
10
+ inputs="text",
11
+ outputs="text",
12
+ title="Hotel Booking Voice AI Chatbot",
13
+ description="Ask anything related to hotel booking",
14
+ ).launch()