Spaces:
Sleeping
Sleeping
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio
|
2 |
+
|
3 |
+
def chatbot(input_text):
|
4 |
+
if input_text.lower() == "hello":
|
5 |
+
return "Hello, how can i help you."
|
6 |
+
elif input_text.lower() == "how are you":
|
7 |
+
return "I'm doing well, thank you for asking."
|
8 |
+
elif input_text.lower() == "bye":
|
9 |
+
return "Goodbye! Have a great day."
|
10 |
+
else:
|
11 |
+
return "I'm sorry, I don't understand. Could you please rephrase your question?."
|
12 |
+
|
13 |
+
|
14 |
+
demo = gradio.Interface(fn=chatbot, inputs="text", outputs="text", title="Chatbot")
|
15 |
+
demo.launch()
|