Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -30,5 +30,13 @@ def get_text_response(user_message,history):
|
|
| 30 |
|
| 31 |
demo = gr.ChatInterface(get_text_response)
|
| 32 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
if __name__ == "__main__":
|
| 34 |
-
demo.launch()
|
|
|
|
| 30 |
|
| 31 |
demo = gr.ChatInterface(get_text_response)
|
| 32 |
|
| 33 |
+
import random
|
| 34 |
+
import gradio as gr
|
| 35 |
+
|
| 36 |
+
def random_response(message, history):
|
| 37 |
+
return random.choice(["Yes", "No"])
|
| 38 |
+
|
| 39 |
+
demo = gr.ChatInterface(random_response, type="messages", autofocus=False)
|
| 40 |
+
|
| 41 |
if __name__ == "__main__":
|
| 42 |
+
demo.launch()
|