Update app.py
Browse files
app.py
CHANGED
@@ -1,12 +1,12 @@
|
|
1 |
import gradio as gr
|
2 |
|
3 |
def chatbot(message):
|
4 |
-
if "conversation" not in
|
5 |
# Initialize conversation as an empty list
|
6 |
-
|
7 |
|
8 |
# Add user input to the conversation history
|
9 |
-
|
10 |
|
11 |
# Define the bot's responses based on user input
|
12 |
if message.lower() == "hello":
|
|
|
1 |
import gradio as gr
|
2 |
|
3 |
def chatbot(message):
|
4 |
+
if "conversation" not in gr.Interface.cache:
|
5 |
# Initialize conversation as an empty list
|
6 |
+
gr.Interface.cache["conversation"] = []
|
7 |
|
8 |
# Add user input to the conversation history
|
9 |
+
gr.Interface.cache["conversation"].append("User: " + message)
|
10 |
|
11 |
# Define the bot's responses based on user input
|
12 |
if message.lower() == "hello":
|