Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,7 +1,7 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
import random
|
| 3 |
|
| 4 |
-
def respond(
|
| 5 |
responses = {
|
| 6 |
"night city": [
|
| 7 |
"Night City is a vibrant and dangerous place! What do you want to know about it?",
|
|
@@ -35,7 +35,7 @@ def respond(Jonny_Silverhand):
|
|
| 35 |
]
|
| 36 |
}
|
| 37 |
|
| 38 |
-
|
| 39 |
for key in responses:
|
| 40 |
if key in user_input:
|
| 41 |
return random.choice(responses[key])
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
import random
|
| 3 |
|
| 4 |
+
def respond(user_input):
|
| 5 |
responses = {
|
| 6 |
"night city": [
|
| 7 |
"Night City is a vibrant and dangerous place! What do you want to know about it?",
|
|
|
|
| 35 |
]
|
| 36 |
}
|
| 37 |
|
| 38 |
+
user_input = user_input.lower()
|
| 39 |
for key in responses:
|
| 40 |
if key in user_input:
|
| 41 |
return random.choice(responses[key])
|