Spaces:
Sleeping
Sleeping
Fixed errors with return statement
Browse files
app.py
CHANGED
|
@@ -3,13 +3,13 @@ import random
|
|
| 3 |
|
| 4 |
def echo(message, history):
|
| 5 |
print("Hello, world!")
|
| 6 |
-
return
|
| 7 |
|
| 8 |
def yes_or_no(message, history):
|
| 9 |
responses = ['yes', 'no']
|
| 10 |
print("message:", message)
|
| 11 |
print("history:", history)
|
| 12 |
-
return random.choice(
|
| 13 |
|
| 14 |
chatbot = gr.ChatInterface(yes_or_no, type='messages')
|
| 15 |
chatbot.launch()
|
|
|
|
| 3 |
|
| 4 |
def echo(message, history):
|
| 5 |
print("Hello, world!")
|
| 6 |
+
return message
|
| 7 |
|
| 8 |
def yes_or_no(message, history):
|
| 9 |
responses = ['yes', 'no']
|
| 10 |
print("message:", message)
|
| 11 |
print("history:", history)
|
| 12 |
+
return random.choice(responses)
|
| 13 |
|
| 14 |
chatbot = gr.ChatInterface(yes_or_no, type='messages')
|
| 15 |
chatbot.launch()
|