File size: 596 Bytes
7b8ebe7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from flask import Flask, render_template
import gradio as gr

app = Flask(__name__)

def chatbot_ai(input_text):
    # Example AI response (modify with your own model)
    response = f"AI: You said: {input_text}. How can I help you?"
    return response

def voice_ai(voice_input):
    # Simulating text from voice input (use Speech Recognition or other APIs for real-time)
    response = f"AI (Voice): You said: {voice_input}. How can I assist you?"
    return response

@app.route('/')
def index():
    return render_template('chatbot.html')

if __name__ == '__main__':
    app.run(debug=True)