Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -25,11 +25,55 @@ def chatbot(user_input,history=[]):
|
|
25 |
return history,history
|
26 |
|
27 |
chat_interface = gr.Interface(
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
35 |
chat_interface.launch()
|
|
|
25 |
return history,history
|
26 |
|
27 |
chat_interface = gr.Interface(
|
28 |
+
fn=chatbot,
|
29 |
+
inputs=[
|
30 |
+
gr.Textbox(
|
31 |
+
lines=2,
|
32 |
+
placeholder="Type your message here...",
|
33 |
+
label="Your Message",
|
34 |
+
),
|
35 |
+
gr.State(),
|
36 |
+
],
|
37 |
+
outputs=[
|
38 |
+
gr.Chatbot(label="Chat History"),
|
39 |
+
gr.State(),
|
40 |
+
],
|
41 |
+
live=True,
|
42 |
+
title="💬 Interactive Chatbot 💬",
|
43 |
+
description="""
|
44 |
+
**Welcome to My AI Chatbot!**
|
45 |
+
|
46 |
+
Experience an engaging conversation with an AI-powered bot.
|
47 |
+
Feel free to ask questions, make requests, or simply chat for fun!
|
48 |
+
""",
|
49 |
+
examples=[
|
50 |
+
["Hello!"],
|
51 |
+
["What's your favorite movie?"],
|
52 |
+
["Tell me a joke."],
|
53 |
+
],
|
54 |
+
theme="huggingface",
|
55 |
+
css="""
|
56 |
+
body {
|
57 |
+
font-family: Arial, sans-serif;
|
58 |
+
background-color: #f9f9f9;
|
59 |
+
}
|
60 |
+
.gradio-container {
|
61 |
+
border-radius: 12px;
|
62 |
+
padding: 20px;
|
63 |
+
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
|
64 |
+
background: #ffffff;
|
65 |
+
max-width: 700px;
|
66 |
+
margin: auto;
|
67 |
+
}
|
68 |
+
.gradio-title {
|
69 |
+
color: #4CAF50;
|
70 |
+
text-align: center;
|
71 |
+
}
|
72 |
+
.gradio-description {
|
73 |
+
font-size: 16px;
|
74 |
+
color: #555555;
|
75 |
+
}
|
76 |
+
"""
|
77 |
+
)
|
78 |
+
|
79 |
chat_interface.launch()
|