Update app.py
Browse files
app.py
CHANGED
@@ -2,8 +2,12 @@ import gradio as gr
|
|
2 |
from chatterbot import ChatBot
|
3 |
from chatterbot.trainers import ListTrainer
|
4 |
|
|
|
|
|
|
|
5 |
def greet(name):
|
6 |
-
|
|
|
7 |
|
8 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
9 |
iface.launch()
|
|
|
2 |
from chatterbot import ChatBot
|
3 |
from chatterbot.trainers import ListTrainer
|
4 |
|
5 |
+
chatbot = ChatBot("Chatpot")
|
6 |
+
|
7 |
+
|
8 |
def greet(name):
|
9 |
+
text = chatbot.get_response(name)
|
10 |
+
return "Hello " + text + "!!"
|
11 |
|
12 |
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
13 |
iface.launch()
|